don*_*ile 5 iphone memory-leaks memory-management instruments
Xcode中的Leaks Instrument向我展示了内存泄漏.我评论了Leaks抱怨的受影响的线路.但我看到我的内存管理没有错误......
- (void)setupViewController {
MyViewController *myVC = [[MyViewController alloc] init];
UITabBarItem *tbi = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemDownloads tag:1];
myVC.tabBarItem = tbi; // LEAK: 128 bytes
self.myViewController = myVC;
[myVC release];
[tbi release];
}
Run Code Online (Sandbox Code Playgroud)
我的意思是... tbi和myVC IS在最后发布,并且alloc IS平衡.那有什么不对?我不明白.
| 归档时间: |
|
| 查看次数: |
380 次 |
| 最近记录: |