【发布时间】:2011-06-03 18:25:01
【问题描述】:
我是 Objective C 的新手,我相信我在这个函数中存在内存泄漏情况,但我不确定何时删除/释放对象。
由于我将recipeObject 存储到我的视图中,我将它释放到视图的dealloc 中,但我不确定视图?
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
RecipeObject * recipeObject = (RecipeObject *)[maRecipes objectAtIndex:indexPath.row];
RecipeView * recipeView = [[RecipeView alloc] initWithNibName:@"RecipeView" bundle:nil];
[recipeView setRecipeObject:RecipeObject];
[self.navigationController pushViewController:recipeView animated:YES];
}
谁能给我举个例子,或者解释一下?
【问题讨论】:
-
请提供有用的标题!
标签: objective-c ios4 xcode4