3 ms·
>> If we do, the compiler can just make instances disappear statically when we're done with them -- not dynamically! > Not possible generally. It would be easy
by eru 8y ago
>> If we do, the compiler can just make instances disappear statically when we're done with them -- not dynamically!
> Not possible generally. It would be easy to create a situation where some kind of refcount is a necessary final fallback.
Either refcount or a GC. But those situations might be rare in practice with a good system.
If you think about it, generational garbage collection implements lots of those heuristics. (But it's closer to a JIT optimizer, not a static optimizer.)