我正在使用以下代码更改导航控制器的根视图:
NSMutableArray *viewControllers = [NSMutableArray arrayWithArray:
[self.navigationController viewControllers]];
NewViewController *nvc = [[NewViewController alloc] init];
[viewControllers replaceObjectAtIndex:0 withObject:nvc];
[self.navigationController setViewControllers:viewControllers];
我是否需要在用newviewcontroller替换它后手动释放当前的视图控制器,还是自动完成?