3 ms·
I like to think about Rust's memory management as static/compile-time garbage collection, as opposed to the traditional dynamic/run-time garbage collection in l
by ceronman 10y ago
I like to think about Rust's memory management as static/compile-time garbage collection, as opposed to the traditional dynamic/run-time garbage collection in languages such as Java.
The process is mostly automatic because you don't have to manually free the memory you use like you do in C. The difference is that the moment when the memory must be freed is determined at compile time by Rust, while a dynamic GC has to determine this at runtime, which uses more resources but also ends up being easier to use.
- pif 10y ago> Rust's memory management as static/compile-time garbage collection I've never worked with Rust, so I may be horribly wrong. Based on what I understood, it's a more than what you say: resources are freed at a time determined by the source code, no random involved, thus you get GC and RAII at once.