3 ms·
The same problem or something similar exists in many languages. Threads are GC roots because the OS knows about them, but this may not be true for lightweight t
by aardvark179 4y ago
The same problem or something similar exists in many languages. Threads are GC roots because the OS knows about them, but this may not be true for lightweight threads or async callbacks.
It is hard to fix because you don’t want to introduce references from an old object (such as a list of callbacks) to many new objects as that will introduce GC issues, and many other potential leaks.