4 ms·
ref counting has a couple of pros and cons: cons - can't handle circular references - sudden churning when something at the root of a large tree can be freed,
by octo_t 13y ago
ref counting has a couple of pros and cons:
cons
- can't handle circular references
- sudden churning when something at the root of a large tree can be freed, causing recursive freeing.
- it really doesn't like multithreading
pros
- deterministic in a single threaded environment
- pretty efficient (4 byte overhead on every object)
- easy to implement