3 ms·
> Historically, there has been two major forms of GC: reference counting, and tracing. The argument happens because, with the rise of tracing garbage collectors
by brianpgordon 8y ago
> Historically, there has been two major forms of GC: reference counting, and tracing. The argument happens because, with the rise of tracing garbage collectors in many popular programming languages, for many programmers, “garbage collection” is synonymous with “tracing garbage collection.” For this reason, I’ve been coming around to the term “automatic memory management”, as it doesn’t carry this baggage.
It's fairly confusing to refer to this as automatic memory management. That term already exists to refer to stack variables getting allocated and initialized in C/C++.
- kibwen 8y agoI 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.