Apr
08

AS3 Gotcha…CLEAN YOUR CODE!!

So after reading Skinner’s post on AS3 Resource management I have one thing to say, CLEAN YOUR CODE!!  That means removing all listeners, and nulling out all of your visualloaders, etc.  Best thing to do is in all of your views have an initialize function and a clean function.  This way you can add listeners in your init and remove them in your clean function.  Also any displayobjects that you remove from the stage never get deleted, at least not that I know of and I build this stuff all day.  So everything that you have in that class is going to remain in memory. So if you can, remove them in your clean function.  Anyway, that’s all for now… have you all seen Google’s new app engine? HOT!!!

Tagged with:


 

 

 

comments

leave a reply