4 ms·
Not if they have circular references... (I agree that Rust makes it difficult to do this accidentally) Also, remember mem::forget() is not unsafe I'm pointing
by nialv7 10y ago
Not if they have circular references... (I agree that Rust makes it difficult to do this accidentally)
Also, remember mem::forget() is not unsafe
I'm pointing this out because I don't want people to have wrong expectation of Rust. Rust doesn't prevent memory leak. Rust doesn't consider memory leak to be "unsafe". Even the Rust team themselves have pointed this out multiple times.
Somehow people are still repeating that Rust can rid you of memory leaks. And I'm downvoted just because I'm pointing out facts. Sigh.