I have a question about the roots of GC. I read that one of the roots of GC is the "live thread". What does it mean?
I always had the impression that each thread has its own stack, and the local stack variables are the GC roots for the thread, and now I'm confused. What other types of references to objects that are not in the frame stack or in their own stack are in the stream view?
Another question is whether the collection of the young generation uses the roots of GC, or is it just for basic algorithms?
thanks
Update: Ok, sorry, so for simplicity: I read this short article: yourkit.com/docs/java/help/gc_roots.jsp and there is the option “Thread” as the root of the GC, which means exactly what this thread is gc root What objects does the Thread GC root refer to that its stack does not refer to? Why are these two categories different?
java garbage-collection multithreading gc-roots
alobodzk
source share