即使我使用autorelease释放结果对象,泄漏工具也会在泄漏仪器中显示100%泄漏。使用autorelease时泄漏?
ResultsViewController *results = [[[ResultsViewController alloc]initWithNibName:
@"ResultsViewController1" bundle:nil] autorelease];
[results getscore:(int)score:(int)skippedwords:(int)crtwords];
[self.navigationController pushViewController:results animated:YES];
我不知道,甚至会编译。第二行是什么?但是如果我们忽略这一点,你的代码就很好。这意味着泄漏(如果有的话)在其他地方。 – 2012-07-17 12:17:20
这段代码没问题。也许仪器显示你泄漏,因为你有一个在ResultsViewController – iSofTom 2012-07-17 12:22:03
从第二行泄漏我将值传递给resultsviewcontroller – gangadhar 2012-07-17 14:17:12