On Tue, 21 May 2013 11:18:25 -0400, WhatMeWorry <[email protected]>
wrote:
a self referential question came to mind: what collects the garbage
collector's garbage? And I'm not trying to be a smart-alec here. I'm
generally curious. Is a Garbage Collector written without garbage
collection?
The garbage collector manually manages its internal memory structures. In
general, there is no need to collect any GC memory, because it doesn't
allocate any unless requested to do so. When it does, any metadata lives
as long as the memory lives. In the cases where memory is returned to the
OS (via GC.minimize), the metadata goes along with it.
-Steve