as i understand when imark the emitter with setAutoRemoveOnFinish(true)
it should remove the emitter and somehow trigger the CCParticleSystemQuad so if i extend the CCParticleSystemQuad
it should call the extended CCParticleSystemQuad class distracture what is not happening .
this is my simple class
class CC_DLL ParticleFromFile : public ParticleSystemQuad
{
public:
static ParticleFromFile* create(const std::string& filename);
CC_CONSTRUCTOR_ACCESS:
ParticleFromFile(const std::string& filename);
virtual ~ParticleFromFile();
private:
CC_DISALLOW_COPY_AND_ASSIGN(ParticleFromFile);
};
ParticleFromFile::ParticleFromFile(const std::string& filename)
{
;
}
ParticleFromFile* ParticleFromFile::create(const std::string& filename)
{
ParticleFromFile* ret = new ParticleFromFile(filename);
if (ret->initWithFile(filename))
{
ret->autorelease();
}
else
{
CC_SAFE_DELETE(ret);
}
return ret;
}
ParticleFromFile::~ParticleFromFile()
{
int stop =0;
}
and this is how i setup the emitter
_emitterLocal = ParticleFromFile::create(stringPilstName);
_emitterLocal->setTag(EXPLOSION_FROM_FILE_TAG);
_emitterLocal->setAutoRemoveOnFinish(true);
_emitterLocal->retain();
_emitterLocal->stopSystem();
_emitterLocal->unscheduleUpdate();
_emitterLocal->scheduleUpdate();
and then i start it with
_emitterLocal->resetSystem();
now every thing is working fine and the particles working great , but it never removed / cleaned and the destructor never called
what do i miss here ?