Flint Particle System Forum - Emitter running slow 2011-06-23T16:31:55+01:00 http://flintparticles.org/forum/ Lussumo Vanilla & Feed Publisher Emitter running slow http://flintparticles.org/forum/comments.php?DiscussionID=196&Focus=752#Comment_752 2009-04-08T23:37:04+01:00 2011-06-23T16:31:55+01:00 Kenny http://flintparticles.org/forum/account.php?u=181 I'm working on a fireworks effect and everything goes as planned except as I let it run for a few times it starts to run really slow, sometimes even crashing my IDE. Is the following code not enough ...
This is the code I have on an EMITTER_EMPTY call back:

var emitter:Emitter2D = Emitter2D(e.target);
emitter.stop();
emitter.removeEventListener(EmitterEvent.EMITTER_EMPTY, next);

Thanks,
Kenny]]>
Emitter running slow http://flintparticles.org/forum/comments.php?DiscussionID=196&Focus=755#Comment_755 2009-04-09T16:31:19+01:00 2011-06-23T16:31:55+01:00 Kenny http://flintparticles.org/forum/account.php?u=181 Problem solved. Just had to remove all the actions and filters from Emitter and PixelRenderer. Emitter running slow http://flintparticles.org/forum/comments.php?DiscussionID=196&Focus=757#Comment_757 2009-04-10T12:52:52+01:00 2011-06-23T16:31:55+01:00 Richard http://flintparticles.org/forum/account.php?u=1 Clearing all references to the emitter would possibly have been enough - then the garbage collector can remove it from ...
emitter.stop();
emitter.removeEventListener(EmitterEvent.EMITTER_EMPTY, next);
renderer.removeEmitter( emitter );
emitter = null;


If you also want to dispose of the renderer you'd need to remove references to this too.

removeChild( renderer );
renderer = null;
]]>