3 ms·
Well, I think the generally agreed upon meaning of "garbage collection" is something along the lines of "automatic memory management at runtime" (garbage piles
by schrototo 15y ago
Well, I think the generally agreed upon meaning of "garbage collection" is something along the lines of "automatic memory management at runtime" (garbage piles up and gets collected) while "automatic reference counting" is "automatic memory management at compile time" (there's nothing to collect since nothing's gonna build up).
All those terms sometimes get used differently in different contexts sometimes, but I think that's what's usually meant by them.
- nknight 15y agoYou're describing the difference between deterministic and non-deterministic garbage collection, not between garbage collection and some other concept. Even non-deterministic tracing garbage collectors may make use of reference counting. Some interesting references: http://en.wikipedia.org/wiki/Garbage_collection_(computer_science) http://en.wikipedia.org/wiki/Garbage_collection_(computer_sc... http://www.research.ibm.com/people/d/dfb/papers/Bacon01Concurrent.pdf http://www.research.ibm.com/people/d/dfb/papers/Bacon01Concu... http://www.google.com/search?q=garbage%20collection%20reference%20counting http://www.google.com/search?q=garbage%20collection%20refere...