I want to know what the BEST practice is for doing this. I do know from my own experience/learnment BUT I want to know, for .NET 2.0 (if there is...) a better way/best practice:
Lets say you have an array. You have items stored in this array.
when you have finished dealing with this temp array, for example, is it best to REMOVE all the contents in the array THEN make it null? or is it best to just make the array null even if there are objects in this array?
Unless the items in the array are Dispose:able, you shouldn't have to worry about removing them. The garbage collect will find 'em just fine...
If the items are Dispose:able, and the only reference you have to them is through the array, you should go through and dispose them before you let go of the Array (just as you would with any other dispose:able object that you no longer need)
Unless the items in the array are Dispose:able, you shouldn't have to worry about removing them. The garbage collect will find 'em just fine...
If the items are Dispose:able, and the only reference you have to them is through the array, you should go through and dispose them before you let go of the Array (just as you would with any other dispose:able object that you no longer need)