Circular reference and Garbage collection

  • Thread starter Thread starter Guogang
  • Start date Start date
G

Guogang

Hi, I have a tree structure in C# with pointer to children and parent. This
will form a circular reference.

My question: will this kind of circular reference affect garbage collection
(parent has references to children, and children have references to parent.
such that none of them can be GC)?

If yes, how can I avoid it?

Thanks,
Guogang
 
Back
Top