3 ms·
I think the comparison is quite apt (and may be deliberate). Automatic memory management for locals in C/C++ uses the scope of a variable to determine when recl
by kibwen 8y ago
I think the comparison is quite apt (and may be deliberate). Automatic memory management for locals in C/C++ uses the scope of a variable to determine when reclamation should occur. Likewise, ownership-based automatic memory management in Rust also simply leverages scope to determine when memory should be freed (though you can pass the memory into other scopes, but at the end of the day it's all just lexical scoping). It's RAII for memory.