|
|
|
|
|
by jordwalke
3095 days ago
|
|
With RC, you might be able to predict when a final reference count goes to zero (though in practice in large apps that might be difficult - I don’t have enough experience) but it doesn’t seem to help you predict the size of the memory graph released as a result, and therefore the time it might take to release it. The size could be determined by lists of arbitrary length that cannot be known statically. The size could be determined by implementation details intentionally hidden from the API consumer to preserve encapsulation.
I’m still willing to concede that RC is somewhat more predictable for current RC and tracing implementations, but in my brief experience I’ve observed that this predictability isn’t as significant as you would hope, and it’s very hard to make use of those predictions. One of the ways people try to make use of this predictability is by shipping references off to another thread to perform the decrement count off the main thread in case it hits zero and cascades into a large collection stall. That isn’t really a satisfactory solution and has its own problems. |
|