Garbage man

Is there a way to force the Flash garbage collector to clear freed memory? I saw that it takes a long time to clear flash without memory reference ...

0


source to share


2 answers


Unfortunately no. This is something Grant Skinner wrote a lot, so check out his blog .



+1


source


You can add things to your garbage collector and then destroy them as they finish.



var antiGC:Dictionary = new Dictionary(false);

var loaderwidth:Tween = new Tween(maskbox, "width", Regular.easeIn, 1, 1000, 25, false);


antiGC[loaderwidth] = loaderwidth;

loaderwidth.addEventListener(TweenEvent.MOTION_FINISH, lwfinished);

function lwfinished(e:TweenEvent){

    loaderwidth.removeEventListener(TweenEvent.MOTION_FINISH, lwfinished);
    antiGC[e.currentTarget] = null;
    delete antiGC[e.currentTarget];
}

      

0


source







All Articles