4 ms·
> you could implement a JVM that used reference counting It would leak memory - reference counting cannot collect cycles (you need tracing GC for that, defeati
by tomp 7y ago
> you could implement a JVM that used reference counting
It would leak memory - reference counting cannot collect cycles (you need tracing GC for that, defeating the purpose of refcounting).
- aidenn0 7y agoFrom right after what you quoted: > (though in order to be general a small amount of additional work is needed) Not also that there are two methods of cycle detection for a reference counted GC that are not just a backup tracing-GC 1. Trial deletion (known since at least the mid 80s) 2. Various tracing systems that exploit extra information known to reference-counted systems e.g. Levanoni/Petrank[1] which actually implemented a reference counted GC for Java. 1: https://www.cs.technion.ac.il/~erez/Papers/refcount.pdf https://www.cs.technion.ac.il/~erez/Papers/refcount.pdf
- tomp 7y agoThanks, I didn't know that!