Hashtable and lifetime of objects inside
Hi all,
I would like to know how to be sure that calling the clear method of my hashtable frees memory from the objects inside.
For example I have:
MyHashTable.Add(mykey, new MyObject(...))
.....
and finally
MyHashTable.Clear(); //because I want to re-populate it again
This code erases all MyObject from memory?
If not, how can I do it?
Thanks
|