// for (int i = 0; i < this->getChildrenCount(); i++)
// {
// CCNode *node = (CCNode *)this->getChildren()->objectAtIndex(i);
// {
// node->removeFromParentAndCleanup(true);
// }
// }
while(this->getChildrenCount() != 0)
{
CCNode *node = (CCNode *)this->getChildren()->objectAtIndex(getChildrenCount() - 1);
if(node != NULL)
{
node->removeFromParentAndCleanup(true);
}
}
}
}