engine-native icon indicating copy to clipboard operation
engine-native copied to clipboard

内存释放

Open hnzlk2014 opened this issue 7 years ago • 3 comments

我想在APP应用里加入游戏的场景,我想在页面返回的时候释放内存,试了几种办法,都不行。请问有什么正确的方法呢? [CCDirectorCaller destroy]; cocos2d::Director::getInstance()->getTextureCache()->removeAllTextures(); cocos2d::Director::getInstance()->end(); cocos2d::Director::getInstance()->mainLoop(); cocos2d::PoolManager::getInstance()->getCurrentPool()->clear();

hnzlk2014 avatar Dec 30 '16 09:12 hnzlk2014

同求~~~

wlssing avatar Apr 13 '18 13:04 wlssing

同求~

zhonghanwen avatar Sep 04 '18 11:09 zhonghanwen

cocos2d::experimental::AudioEngine::end(); // network. cocos2d::network::HttpClient::destroyInstance(); // director. cocos2d::Director::destroyInstance(); // application if (s_sharedApplication != nullptr) { delete s_sharedApplication; s_sharedApplication = nullptr; }

neufeng avatar Aug 18 '20 12:08 neufeng