Hacker News new | ask | show | jobs
by majewsky 2804 days ago
The documentation for std::mem::forget says this:

> Rust's safety guarantees do not include a guarantee that destructors will always run. For example, a program can create a reference cycle using Rc, or call process::exit to exit without running destructors. Thus, allowing mem::forget from safe code does not fundamentally change Rust's safety guarantees.

https://doc.rust-lang.org/std/mem/fn.forget.html