我檢查用的NSLog每個視圖來檢查視圖dealloced,detailViewController從未dealloced,過了一會兒,我得到一個內存警告,唯一這就是所謂的ViewDidUnload。
怎麼叫的觀點,什麼項目都推到它
的觀點被稱爲,並在表推,在detailViewController我有了一個信息搜索結果:
@property (nonatomic,weak) SearchResult *searchResult;
這裏是detailViewController稱爲:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
DetailViewController *controller = [[DetailViewController alloc]initWithNibName:@"DetailViewController" bundle:nil];
SearchResult *searchResult = [search.searchResults objectAtIndex:indexPath.row];
controller.searchResult = searchResult;
[self.navigationController pushViewController:controller animated:YES];
//made a property with (nonatomic,weak) DetailViewController and set it to the controller
self.detailViewController = controller;
}
是怎樣的detailViewController貝因摹佈置
-(void)back:(UIButton *)sender{
[self.navigationController popViewControllerAnimated:YES];
}
什麼,我認爲這個問題是
我只是猜測.. 我的Alloc某些功能的Alloc一些東西,在detailViewController,但如果我回去,那麼這些東西都是自動發佈的權利? 它要的東西多數民衆贊成保留,但我不能找出在detailViewController我確實有這些私有財產在detailViewController,如:
@property (nonatomic, retain) iCarousel *carousel;
@property (nonatomic, retain) UINavigationItem *navItem;
,但如果我走出視圖我如何能釋放這些對象的?還是不是這個問題?
UPDATE:
當我推回去:
NSLog(@"%@", [self navigationController]);
[self.navigationController popViewControllerAnimated:NO];
NSLog(@"%@", [self navigationController]);
LOG:
2013-01-13 19:33:30.703 App[21683:707] <UINavigationController: 0xfeafbf0>
2013-01-13 19:33:30.705 App[21683:707] (null)
我使用ARC
什麼看法是永遠不會實現的?我無法分辨你的觀點。 – rdelmar
@rdelmar對不起,我編輯了這個問題......但它的詳細視圖 – MichaelAngelo
我沒有看到任何detailView。你的意思是detailViewController? – rdelmar