Clear memory leaks of the test_uphone project
This commit is contained in:
natural-law 2010-09-16 09:19:18 +00:00
parent 976c52ae02
commit 6bd7d28e06
2 changed files with 6 additions and 1 deletions

View File

@ -374,7 +374,7 @@ CCMultiplexLayer * CCMultiplexLayer::layerWithLayers(CCLayer * layer, ...)
bool CCMultiplexLayer::initWithLayers(CCLayer *layer, va_list params)
{
m_pLayers = new NSMutableArray<CCLayer*>(5);
m_pLayers->retain();
//m_pLayers->retain();
m_pLayers->addObject(layer);

View File

@ -426,5 +426,10 @@ void MenuTestScene::runThisTest()
CCMultiplexLayer* layer = CCMultiplexLayer::layerWithLayers(pLayer1, pLayer2, pLayer3, pLayer4, NULL);
addChild(layer, 0);
pLayer1->release();
pLayer2->release();
pLayer3->release();
pLayer4->release();
CCDirector::getSharedDirector()->replaceScene(this);
}