Flint Particle System Forum - Emitter running slow2011-06-23T16:31:55+01:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Emitter running slowhttp://flintparticles.org/forum/comments.php?DiscussionID=196&Focus=752#Comment_7522009-04-08T23:37:04+01:002011-06-23T16:31:55+01:00Kennyhttp://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 slowhttp://flintparticles.org/forum/comments.php?DiscussionID=196&Focus=755#Comment_7552009-04-09T16:31:19+01:002011-06-23T16:31:55+01:00Kennyhttp://flintparticles.org/forum/account.php?u=181
Problem solved. Just had to remove all the actions and filters from Emitter and PixelRenderer.
Emitter running slowhttp://flintparticles.org/forum/comments.php?DiscussionID=196&Focus=757#Comment_7572009-04-10T12:52:52+01:002011-06-23T16:31:55+01:00Richardhttp://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.