[Gc] Circular references

Aleksey Demakov ademakov at gmail.com
Wed Feb 27 00:39:50 PST 2008


Hi Christian,

On Wed, Feb 27, 2008 at 1:41 PM, Christian Gudrian
<gn at fluidon.dyndns.info> wrote:
>  I am using a doubly linked list of garbage collected objects which does
>  not get collected properly (because of the circular references I
>  presume).  Do I need to iterate through the list and break these
>  circular references or is there an appropriate mechanism in the
>  collector I am unaware of?
>

There is no need to break circular references for garbage
collector to detect garbage. As long as objects are not
reachable from gc roots they are subject to garbage
collection.

Regards,
Aleksey


More information about the Gc mailing list