资源大湿 发表于 2021-9-1 13:36

cocos内存警告代码


#pragma mark -
#pragma mark Memory management

- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
    /*
   Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
   */
   cocos2d::Director::getInstance()->purgeCachedData();
}


- (void)dealloc {
    ;
}


@end

可能导致闪退的可以把这个注掉
页: [1]
查看完整版本: cocos内存警告代码