3 ms·
To add to what was said, one of the main ways to leak memory is `Box::leak` [0], meaning most memory leaks are explicit and intentional, rather than implicit an
by epage 2y ago
To add to what was said, one of the main ways to leak memory is `Box::leak` [0], meaning most memory leaks are explicit and intentional, rather than implicit and accidental. Likely the main implicit/accidental way to leak memory are Rc cycles.
Looks like https://cglab.ca/%7Eabeinges/blah/everyone-poops/ https://cglab.ca/%7Eabeinges/blah/everyone-poops/ has more background on why this is allowed.
[0]: https://doc.rust-lang.org/std/boxed/struct.Box.html#method.leak https://doc.rust-lang.org/std/boxed/struct.Box.html#method.l...