The Leakage tool in Xcode shows me a memory leak here. I commented on the affected line that Leak complains about. But I do not see errors in memory management ...
- (void)setupViewController {
MyViewController *myVC = [[MyViewController alloc] init];
UITabBarItem *tbi = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemDownloads tag:1];
myVC.tabBarItem = tbi;
self.myViewController = myVC;
[myVC release];
[tbi release];
}
I mean ... tbi and myVC IS are released at the end, and alloc is balanced. So what? I do not understand.
source
share