我找不到问题出在哪里,但是这段代码正在崩溃。我是否过度释放任何对象?
settings = [[SettingsViewController alloc] initWithNibName:@"SettingsController" bundle:nil];
settings.hidesBottomBarWhenPushed = YES;
NSArray * arrayWithRootController = [[NSArray alloc] initWithObjects:settings, nil];
[(UINavigationController*)([self.tabBar.viewControllers lastObject])setViewControllers:arrayWithRootController];
[arrayWithRootController release];
[settings release];
如果我删除线
[settings release];
该应用程序不会崩溃。但我很确定它是正确的。问题可能出在其他地方吗?
有任何想法吗?非常感谢