3 ms·
Circular references is a big one. There are also performance advantages though. Reference counting turns operations that would normally be just a memory read in
by ufo 4y ago
Circular references is a big one. There are also performance advantages though. Reference counting turns operations that would normally be just a memory read into a read+write, because of the need to update reference counts. You also need more bookkeeping space: a garbage collector only needs a bit or two per object, while a reference count needs several bits (up to a full word in the worst case).