Would this cause memory leak ?
var mc:MovieClip ; //<<<<<<< OUTSIDE LOOP
for ( var i=0 ; i< 1000 ; i++)
{
mc = new MovieClip() ;
mc.addEventListener( MouseEvent.CLICK , onClick) ;
}
And what about this ?
for ( var i=0 ; i< 1000 ; i++)
{
var mc:MovieClip ; //<<<<<<< INSIDE LOOP
mc = new MovieClip() ;
mc.addEventListener( MouseEvent.CLICK , onClick) ;
}
"removeEventListener" is not used in any of the above code, so I think that both are causing a memory leak.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With