views:

77

answers:

1

I have a UIViewController that I wish to push onto the stack, however, when I call [viewController release] on it after I push it, any time I pop it off of the stack however, I get various errors pertaining to deallocated instances of the view controller. Here is an example of an implementation:

        RootViewController *rootViewcontroller = [[RootViewController alloc] initWithNibName:@"RootViewController" 
                                                                                          bundle:nil];
        [self.navigationController pushViewController:rootViewController animated:YES];
        [rootViewController release];
A: 

In the code that you showed you create rootViewController but actually push personsViewController. Typo? Or did you paste the wrong code?

St3fan
Sorry, it's a typo, I corrected it.
Yakattak
The code you show is perfectly fine. So it must be somewhere else. Like inside the `RootViewController`.
St3fan