Reference count, don't garbage collect
This debate has gone round and round for decades. There are no hard lines; this is about performance tradeoffs, and always will be.<p>Perhaps the biggest misconception about reference counting is that people believe it avoids GC pauses. That's not true. Essentially, whereas tracing GC has pauses while tracing live data, reference counting has pauses while tracing garbage.<p>Reference counting is really just another kind of GC. I'd highly recommend perusing this paper for more details:
A Unifying Theory of Garbage Collection.
<a href="https://web.eecs.umich.edu/~weimerw/2012-4610/reading/bacon-garbage.pdf" rel="nofollow">https://web.eecs.umich.edu/~weimerw/2012-4610/reading/bacon-...</a><p>One of the biggest issues with reference counting, from a performance perspective, is that it turns reads into writes: if you read a heap-object out of a data structure, you have to increment the object's reference count. Modern memory architectures have much higher read bandwidth than write bandwidth, so reference counting typically has much lower throughput than tracing GC does.