我在下面的代码中有泄漏的对象。我如何解决它?我试着添加一个[apiViewController发布];但是当我分析的应用程序,我仍然获得了:如何修复保留计数为+1的泄漏对象?
if (idx == 2) {
NSLog(@"you touched menu 2");
APICallsViewController *apiViewController = [APICallsViewController alloc];
[self.navigationController pushViewController:apiViewController animated:YES];
//[apiViewController getFriendsCallAPIDialogFeed];
[apiViewController getAppUsersFriendsUsing];
}
感谢您的帮助
你不知道你在做什么。在iOS堆管理中找到一个很好的参考并研究它。 –
其中一些内容已在[高级内存管理](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/MemoryMgmt/Articles/MemoryMgmt.html)中介绍。 – Rob