Each time the user changes directories, I clear the current contents of all the labels and assign null to each label. I understand that this does not release the labels, but it does release the memory held by their contents (I think).
So the question I have is: Is there a better way to do this? The garbage collector won't mess with any object that is still referenced, and all of the labels in the array are always referenced. So, as I understand it, unless I clear the contents each time, I get something like:
A user goes into a dir with 300 .mp3's in it, does something, then goes to a dir with 5 entries in it. Unless I clear the old entries, I still have 295 entries full of stuff I no longer need that the garbage collector will ignore.
Am I understanding this correctly so far? No, I can't do what I need with a listview, it isn't flexible enough to display different colors for different entry types, etc.
Suggestions?
--- Jem