Flint Particle System Forum - Remove all from Memory2010-12-26T16:11:13+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Remove all from Memoryhttp://flintparticles.org/forum/comments.php?DiscussionID=203&Focus=771#Comment_7712009-04-18T22:34:26+01:002010-12-26T16:11:13+00:00luigicoriahttp://flintparticles.org/forum/account.php?u=111
Hi, i've made the exaple and it looks pretty good. Now i want to remove al the particles from memory when i change to another movie. how to do that?
Remove all from Memoryhttp://flintparticles.org/forum/comments.php?DiscussionID=203&Focus=772#Comment_7722009-04-20T07:49:33+01:002010-12-26T16:11:13+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
To clean up completely, you need to...
// Stop the emitter
emitter.stop();
// Clear all the cached particles
ParticleCreator2D( emitter.particleFactory ).clearAllParticles();
// Remove ...
// Stop the emitter emitter.stop(); // Clear all the cached particles ParticleCreator2D( emitter.particleFactory ).clearAllParticles(); // Remove references to the emitter renderer.removeEmitter( emitter ); emitter = null; // Remove references to the renderer removeChild( renderer ); renderer = null;]]>