2 ms·
Reference counting deals with operations that have constant time, which I think puts it in a different category than what people normally view as GC.
by sgt 5y ago
Reference counting deals with operations that have constant time, which I think puts it in a different category than what people normally view as GC.
- Zababa 5y agoI'm not sure that's true. Python mainly uses RC, yet most people think of Python as GC'd. I would argue that most people think that GC == automatic memory management.
- sgt 5y agoYes, I think you are correct actually.
- kaba0 5y agoAnd has a different tradeoff, due to atomic operations being needed for objects shared between threads (and of course, circular references). But no matter what, it is literally a GC algorithm, described in every book about GCs.