How to properly manage memory of CCParticleSystemQuad

How to properly manage memory of CCParticleSystemQuad
0.0 0


Often I randomly create and add particles and don’t entirely understand the memory management best practices.
For instance:

ARCH_OPTIMAL_PARTICLE_SYSTEM *particles = CCParticleSystemQuad::particleWithFile(“particlePlist.plist”);

results in a crash when in CCScheduler::removeUpdateFromHash element~~>target~~>selectorProtocolRelease(); is called.

If I do not setIsAutoRemoveOnFinish, it’ll crash when the parent node is removed.

I’ve got around this generally by keeping a reference to all created particle systems generated with a new () rather than the static method and ultimately calling


What is the proper way to instantiate and add a particle system that you’d like to clean up itself after finishing?

Thanks for any help.


I really want to know about this too :frowning:


I noticed in the example there’re commented out autoreleases, maybe this is a known issue?


Any updates on this issue?


I wanna know as well. I couldn’t create a particle system correctly in my code.