4 ms·
Memory leaks in rust might be less common than a fully GC'ed language but saying rust prevents or makes them less common than e.g. zig/c++ seems like a stretch.
by krona 4y ago
Memory leaks in rust might be less common than a fully GC'ed language but saying rust prevents or makes them less common than e.g. zig/c++ seems like a stretch.
- crabbygrabby 4y agoYou literally cannot get them period in rust. Like it is not possible. That's the point of rust.
- 3836293648 4y agoLeaks are absolutely considered safe by rust. Just look at Box::leak. And if we're comparing it to GC'd "leaks", those are typically hashmaps growning out of control and that can also happen
- voorwerpjes 4y agoLeaks can happen in rust. The guarantee safe rust makes is that memory leaks cannot result in undefined behavior.