Copy link to clipboard
Copied
Hey there. I just wanted to know if anyone has some ideas on performance / memory usage if audio clips are added to the timeline as events, instead of using code to play them back?
If a timeline is full of sounds being played back, is there anything special i need to do for garbage collection? Are they sitting in memory before they are played because the entire MC is on the stage? Do they prevent an MC from being garbage collected once it's removed from the stage?
I hope i'm being clear enough, not sure how else to ask this.
Thanks!
Copy link to clipboard
Copied
removing an object from the display list does not ready it for gc. it must be removed and all references removed.
eg, for any referenceable display object (with only one reference), with our without, sounds, video etc, :
if(dobj.stage){
dobj.parent.removeChild(dobj);
}
dobj = null;
will ready the object for gc
}