About Garbage Collection

  • Thread starter Thread starter venkat rajesh
  • Start date Start date
is Garbage Collection a Process or a thread ?

Neither, really. Garbage collection can happen on any thread which is
allocating memory - if it notices that it can't allocate what it needs
to, it collects the garbage, usually suspending other threads to do so
(modulo concurrent GC).

There is, however, a finalizer thread, which runs finalizers of
objects which aren't referenced but haven't been collected yet.

Jon
 
Back
Top