2012-07-10 67 views

回答

2

在你的控制器,一旦你有低内存警告此功能会调用:

- (void)didReceiveMemoryWarning { 
    // Releases the view if it doesn't have a superview. 
    [super didReceiveMemoryWarning]; 

    // Release any cached data, images, etc. that aren't in use. 
} 
1

释放任何未使用的对象,零任何未使用的属性,而运行一个类。释放+无dealloc中的所有插座,无viewDidUnload中的所有插座。同时释放您已经“分配”,“保留” - 或“复制”的所有对象。使用Profiler来检测内存泄漏。发布你的代码,如果你想具体的答案。你的问题是一个错误的内存管理问题,这是一个依赖于许多事情的巨大领域。

相关问题