4 ms·
> Reference counters don't have predictable latency: a single reference decrement can lead to an arbitrary amount of follow up work, like more decrements and de
by jstimpfle 2y ago
> Reference counters don't have predictable latency: a single reference decrement can lead to an arbitrary amount of follow up work, like more decrements and deallocations.
You can push the cleanup work on a queue to do it asynchronously, to bound the amount of work per deref / to even the work out.
- eru 2y agoYes, definitely, you don't have to use the simplest version of reference counting, you can soup it up. But you can play the same games with GC. So this is not specific to reference counting. There are incremental and real time versions of GC.