When garbage collection is initiated, the first task is to mark all allocated chunks of memory that are still in use. First, the interpreter or VM marks all chunks of allocated memory as unused. This is done by resetting a flag that is either in the allocated chunk of memory, or a flag that is a part of an entry in the universal array of pointers.
Next, the interpreter or VM starts with the list of registered active handles. These handles correspond to (named) variables. As a handle is processed, it is first marked as used in the universal array of pointers (or a flag in the allocated object itself).
Then, the interpreter or VM locates the special segment of handles in the object being referenced, and perform the same operation recursively with those handles. This process ends with a handle that is already marked used, or when an object that contains no handles to other objects.
As this process terminates, all the handles in the universal array of pointers are either marked as used or reset as unused. The objects referenced by all the unused handles are then deleted.
Note that this will eliminate circular data structures that are not reachable by the program!