Maksim <Ma****@discussions.microsoft.com> wrote:
I have a link list; if I want to Clear the list do I have to set every node
in the list to null or I can simply set the Head/Tail nodes to null?
If I set Head/Tail to null, will the GC free any resources used by the nodes
between Head and Tail?
If you just want to make sure it's all eligible for garbage collection,
why not just make sure you're not holding onto any references to the
list in the first place?
Other than that, it depends on the implementation, basically.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too