Fork me on GitHub
Not signed in (Sign In)

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

    • CommentAuthorchien
    • CommentTimeSep 3rd 2008 edited
     
    I see there have been some changes in the trunk. I have incorporated the new paths into apllications but have 1 question remaining.

    when I use the new emitter.stop() does that also incorporate the old renderer.dispose() functionality?
    is there still any need to null out the emitter and renderer?

    public function stopEmitter():void {
    steadyCounter.stop();
    emitter.stop();
    emitter = null;
    //renderer.dispose();
    removeChild(renderer);
    renderer = null;
    }


    thanks,

    chien
    • CommentAuthorRichard
    • CommentTimeSep 3rd 2008
     
    Hi Chien

    As explained here, trunk now contains the alpha of version 2. If you want to continue working with version 1, 1.0.4 is in tags.

    You always have to null any persistent variable references if you want the objects they refer to to be garbage collected. So, yes, with version 2 you still need to null emitter and renderer, also remove the renderer from the stage and stop the emitter. There's no need to stop the counter, but if you've retained a reference to it then you will need to null this too. No need to call dispose on the renderer.

    public function stopEmitter():void {
    emitter.stop();
    removeChild(renderer);
    renderer = null;
    steadyCounter = null;
    emitter = null;
    }
    • CommentAuthorchien
    • CommentTimeSep 3rd 2008
     
    Thanks Richard.

    chien