9.2. Memory ownership

Memory ownership

When a stack frame is exited, its local allocations are all released, and its references to boxes are dropped.

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/reference/memory-ownership.html