3 ms·
Leaks are as hard to do in Rust as with a GC though. That is, they aren't impossible and you'll eventually have to fight against one nasty one in your job, but
by littlestymaar 2y ago
Leaks are as hard to do in Rust as with a GC though.
That is, they aren't impossible and you'll eventually have to fight against one nasty one in your job, but it's far better than without a GC or borrowck.
- jakobnissen 2y agoI don't think that's right - in Rust, cycles of Rc or Arc will leak. In GC languages, cycles are properly deleted.
- littlestymaar 2y agoCycles with reference-counted pointers are how leaks are caused in Rust and it's specific to Rust, but GCs have their own sources of leaks and in my experience they occur roughly as frequently as cycles in Rust (rarely but not exceptionally either)