Release / dealloc标签栏视图控制器

时间:2012-01-18 11:44:07

标签: iphone objective-c ios ipad memory-management

我已经使用nib文件分配了标签栏视图控制器,当我尝试释放标签视图控制器时,它不会调用任何视图控制器的dealloc功能。我发布如下:

[appDelegate.tabBarController.view removeFromSuperview];
NSMutableArray * vcs = [NSMutableArray arrayWithArray:[appDelegate.tabBarController viewControllers]];
[[vcs objectAtIndex:2] release]; //tried releasing both ways
[vcs removeObjectAtIndex:2];
[[vcs objectAtIndex:1] release];
[vcs removeObjectAtIndex:1];
[[vcs objectAtIndex:0] release];
[vcs removeObjectAtIndex:0];
[appDelegate.tabBarController setViewControllers:vcs];

请帮帮我。

0 个答案:

没有答案