![]() | ![]() | ![]() | Garbage Collection |
So, the "main program" of a garbage collector might look like:
for each record in heap do record->alreadyfound = false for each root do findThings( root )
findThings( root ) { if ( root != NULL && ! root->alreadyfound ) then { root->alreadyfound = TRUE; for all ``child''ren of root do findThings( child ) } }
![]() | ![]() | ![]() | Garbage Collection |