RootViewController
がリリースされた後にsetRegions
が呼び出されたこのコードを読んでいました。少し奇妙です。RootViewController
はまだリリースされていて、まだself.navigationController
がそれを所有していますか?メソッドを呼び出すか?
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Create the navigation and view controllers
RootViewController *rootViewController = [[RootViewController alloc] initWithStyle:UITableViewStylePlain];
UINavigationController *aNavigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController];
self.navigationController = aNavigationController;
[aNavigationController release];
[rootViewController release];
[rootViewController setRegions:[Region knownRegions]];
// Configure and display the window
[window addSubview:[navigationController view]];
[window makeKeyAndVisible];
}
おかげ
アレックス・ウェインの答えは – Paul