About Garbage Collection

J

Jon Skeet [C# MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top