I wonder if anyone can help me regarding memory management in the code below. I'm particularly interested in rootController, it persists when I execute initWithRootViewController or instead (this is my hunch), it is saved in the addSubView window: I'm just wondering what happens ...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
Base_TableViewController *rootController = [[Base_TableViewController alloc] init];
navController = [[UINavigationController alloc] initWithRootViewController:rootController];
[window addSubview:[navController view]];
[window makeKeyAndVisible];
[rootController release];
return YES;
}
- (void)dealloc {
[navController release];
[window release];
[super dealloc];
}
EDIT:
So, essentially, the code above is correct, the release at the bottom cancels the selection at the top, does the "rootController" persist navController?
Thank you very much, very grateful.
Gary
source
share