HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Do unit arrays leak?

12-24-2010, 01:56 AM#1
rogueteddybear
If i have filled an array with, say, 40 units, do the handles leak if i don't loop through the array, setting them to null?
12-24-2010, 07:14 AM#2
jrhetf4xb
It is the same as not nulling 40 separate unit variables, so yes, it would cause some memory leaks.
12-24-2010, 07:57 AM#3
Ammorth
However, if you replace the array with new units, the old values will not "leak". They will be garbage collected normally by the engine. Leak is more for data that is lost and can never be recovered, vs data that is still accessible but hasn't been cleared yet.