3 ms·
But you don't know which reference is the last until you actually get there - that is why you used reference counting in the first place, because you were unabl
by danbruc 13y ago
But you don't know which reference is the last until you actually get there - that is why you used reference counting in the first place, because you were unable to statically determine which reference will be the last one. So every time you abandon a reference it might be the last one and you might have to spend extra cycles to free the resource. This is no more deterministic than a garbage collector.
- letzjuc 13y agoIn a non-deterministic garbage collector memory _might not_ be released when the last reference goes out of scope (and this is often the case).