4 ms·
This thread lists all the ways drop may not be called in Rust: https://users.rust-lang.org/t/drop-guarantees/20230/ https://users.rust-lang.org/t/drop-guarantee
by ChrisSD 8y ago
This thread lists all the ways drop may not be called in Rust: https://users.rust-lang.org/t/drop-guarantees/20230/ https://users.rust-lang.org/t/drop-guarantees/20230/
I'm not sure it's possible to force any code to be run (e.g. a process can be terminated at any time) although a closure might offer slightly stronger guarantees in some situations.