Sarfraz Hooda <sh****@iqueri.com> wrote:
I have created an array of Objects in a collection. I was wondering is there
a way to destroy the array to free up the space in the memory ? or they are
automatically destroyed and garbagge collected by .Net framework?
When the array is no longer referenced (or is only referenced by things
eligible for garbage collection) it will become eligible for garbage
collection.
The references inside the array will become eligible for garbage
collection when the array does if and only if there are no other
references to them (which aren't themselves eligible for garbage
collection).
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too