Flint Particle System Forum - garbage disposal revisited Wed, 17 Nov 2010 11:06:00 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher garbage disposal revisited http://flintparticles.org/forum/comments.php?DiscussionID=76&Focus=354#Comment_354 http://flintparticles.org/forum/comments.php?DiscussionID=76&Focus=354#Comment_354 Wed, 03 Sep 2008 14:14:59 +0100 chien
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 ]]>
garbage disposal revisited http://flintparticles.org/forum/comments.php?DiscussionID=76&Focus=355#Comment_355 http://flintparticles.org/forum/comments.php?DiscussionID=76&Focus=355#Comment_355 Wed, 03 Sep 2008 16:42:03 +0100 Richard
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;
}
]]>
garbage disposal revisited http://flintparticles.org/forum/comments.php?DiscussionID=76&Focus=356#Comment_356 http://flintparticles.org/forum/comments.php?DiscussionID=76&Focus=356#Comment_356 Wed, 03 Sep 2008 17:20:39 +0100 chien
chien ]]>