在一个cclayer中使用
CCNodeLoaderLibrary* ccNodeLoaderLibrary = CCNodeLoaderLibrary::newDefaultCCNodeLoaderLibrary();
reader = new CCBReader(ccNodeLoaderLibrary);
reader->autorelease();
CCNode* node = reader->readNodeGraphFromFile(“demo.ccbi”, this);
reader->getAnimationManager()->setAnimationCompletedCallback(this, callfunc_selector(RollsLayer::playFinish));
reader->getAnimationManager()->runAnimationsForSequenceNamed(NORMAL);
addChild(node);
然后在playFinish中写了
reader = NULL;
removeAllChildrenWithCleanup(true);
getParent()->removeChild(this, true);
但是在本类的始终都不能析构,请问这是为什么??
