//釋放暫時不使用的內存,共當前程序使用.
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
//當收到內存警告時,移除當前沒有在屏幕上顯示的視圖.
//判斷是否可以安全的移除視圖控制器的view.
//判斷當前的視圖控制器的view是否是屏幕上顯示.self.view.window
//判斷當前視圖控制器的view是否已經成功加載.isViewLoaded
if( self.view.window == nil && [self isViewLoaded]) {
//安全移除控制器的view;
self.view = nil;//[_view release];_view = nil;
}
//NSLog(@"%@",self.view.window);
}