At the end of this code:
UIViewController *viewController = [[UIViewController alloc] init];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
[viewController release];
[self presentModalViewController:navigationController animated:YES];
[navigationController release];
The navigation controller appear modally, as usual, but when I click a button on the viewController, it crashes. In fact, the viewController has a retain count of 0. If I comment one of the two releases everything went better than expected. I have been seeing this code pretty much everywhere, what could be wrong?