Quantcast
Viewing latest article 10
Browse Latest Browse All 99

Answer by murkantilism

I'm not a guru on Unity garbage collection by any means, hopefully someone more knowledgeable can confirm: I don't think setting variables to null with help with garbage collection. It won't entirely free up the memory space taken up by that variable, because it will still store it's value as null. If the value *used to* be a large array or a vector, setting it to null will lower the amount of memory taken up by the variable, but it won't lower it to 0 bytes. Check out these pages for more info: [One](http://answers.unity3d.com/questions/7853/garbage-collection.html), [Two](http://answers.unity3d.com/questions/27096/best-practices-for-garbage-collection.html), [Three](http://docs.unity3d.com/Documentation/Manual/UnderstandingAutomaticMemoryManagement.html).

Viewing latest article 10
Browse Latest Browse All 99

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>