2012-07-10 71 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來檢測內存泄漏。發佈你的代碼,如果你想具體的答案。你的問題是一個錯誤的內存管理問題,這是一個依賴於許多事情的巨大領域。

相關問題