Some background first. I have a custom animated sprite class which essentially runs on one CCSpeed action, which is run using a CCSequence containing either a single animate action, or multiple animate actions and can end with a function call to loop the animation (i chose to forego cocos2d loop options). Then I access the speed action to control animation rate.
The problem I’m having is during my load phase to another portion of the game. I delete my object that contains the CCSpeed, and at the same time uncache the sprites/textures associated with the CCSpeed actions animations. In my destructor I call if(isRunning()) stopAllActions(); Hoping this will stop the CCSpeed (including any pending loop function calls in sequence). I can’t manually stop the action with ~~>stop because its running on auto release and I don’t know if its actually running
Then i get an error at
CCAssert == m_pobBatchNode~~>getTexture()->getName(), “CCSprite: Batched sprites should use the same texture as the batchnode”);@
which in the call stack traces back to the action manager calling the CCSpeed to step
So I’m suspecting that after I unload my frames and texture, the CCSpeed has not stopped, and is attempting to continue animating.
How do i properly shut down the CCSpeed?