Rust Ownership and Freeing Memory
Rust has no garbage collector. Every value has a single owner, and the value is dropped where that owner’s scope ends. Because the drop point is fixed by scopes in the source code, files and locks are cleaned up by the same rule as memory. The first post in a Rust study series.