每次我推送一个新的视图控制器时,它都会增加大约 3MB。TestVC 是一个全新的 VC,具有一种推送新版本 VC 的方法。
UIViewController *vc = [[TestVC alloc] initWithNibName:nibName bundle:nil];
[self.navigationController pushViewController:vc animated:YES];
[vc release];
当我弹出视图控制器时,它不会释放任何内存(观看活动监视器)。
[self.navigationController popViewControllerAnimated: YES];
因此,当我在应用程序中添加导航(大约 60 个不同的页面)时,内存会不断增加。initWithNibName 是否需要一些特别的东西。当我弹出时,我需要以某种方式释放笔尖吗?