Hi,
I’m having a strange issue with particle systems that I’m trying to work out.
I have an amount of particle systems used in a scene. Each type of particle is stored in a CCArray, and all CCArrays are stored in a CCDictionary, like this:
particleContainer_ = CCDictionary::create();
particleContainer_>retain;>setObject(array1, key1);
>
CCArray *array1 = CCArray::create;
particleContainer_
>
CCArray array2 = CCArray::create;
particleContainer_>setObject;>addObject;
>
>
CCParticleSystemQuad *particle1 = CCParticleSystemQuad::create;
array1
>
CCParticleSystemQuadparticle2 = CCParticleSystemQuad::create(type);
array2->addObject(particle2);
etc.
Particles are not retained anywhere, so they should be autoreleased. At the release of the scene I call:
CC_SAFE_RELEASE(particleContainer_);
Problem is that when checking allocations in the XCode instruments I am seeing a heap growth from the particle systems each time I load and exit the scene, so they don’t seem to be getting released. Anyone know what could be wrong? Thanks