Stage 6.3: Scope-based Resource Management
Rust uses the end of scope as the place to deconstruct and deallocate a resource.
The term for this deconstruction and deallocation is called a drop.
Memory details:
- Rust does not have garbage collection.
- This is also called Resource Aquisition Is Initialization ( RAII ) in C++.