I'm having an issue where not all of my objects are getting cleaned up like I think they would. In one of my Layers, in it's onExit method, I call [self removeAllChildrenWithCleanup]; However, some of the children don't seem to unschedule themselves, or get released.
I can't find anywhere in my code where I'm explicitly retaining the node I want to kill off, but even if I do this:
- (void) onExit
{
LOG (@"GamePlayUILayer:onExit");
[self removeAllChildrenWithCleanup:YES];
[self removeChild:comboMeter cleanup:YES];
[super onExit];
}
the comboMeter still sticks around, and is never cleaned up or unscheduled. Am I calling removeAll… at the wrong time? What is the ideal process for shutting down a scene, and killing off all associated objects?