- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
AViewController * aView = [[AViewController alloc] initWithNibName:@"myNib" bundle:[NSBundle mainBundle]];
return vintagePriceRowView.view;
}
我知道這段代碼需要釋放...某處。但是哪裏?如果我將分配的AviewController設置爲自動釋放,那麼觸摸視圖中的元素將導致「發送到釋放實例0xfb5780的消息」將元素放置到UITableView頁腳中,何時釋放它們?
泄漏儀器實際上並未顯示泄漏,但顯然Clang不喜歡上述代碼。我知道Clang不是福音,只要確定代碼中可能出現錯誤的所有內容即可,但在這種情況下,感覺可能是正確的。我已經分配了它,我需要釋放它。
關於我在做什麼的錯誤?