Movie clip garbage collection As3


hi guys,

 

i'm new as3 , i'm working on game involves several movie clips playing 1 right after other , works great far i'm not sure wise of me make movie clips using image sequences , have issue of ram usage. there way clear ram using garbage collection when clip has finished playing , no longer needed? game plays , ram keeps adding until gets around 12gb , crashes not ideal. ideas?

 

thanks in advance

alex

to allow animate pro gc movieclips need remove display, remove listeners , null references.  eg, for

 

var mc:movieclip=new movieclip();

addchild(mc);

mc.addeventlistener(mouseevent.click,f);

 

// need execute following enable mc gc'd:

 

removechild(mc);

mc.removeeventlistener(mouseevent.click,f);

mc=null;



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

Soustraire une selection

After Effects: could not find dvaeve_dialogs.txt

Illustrator cs6 "Invalid Serial Number"