title: Message sent to deallocated instance
body: <p>I have an app that navigates thru different views using the navigation controller. This is what I’m doing:</p>
  
  <pre><code>MapViewController *aMap = [[MapViewController alloc] initWithNibName:@"MapView" 
                                                                bundle:nil ];
  [self.navigationController pushViewController:aMap 
                                       animated:YES];
  [aMap release];
  </code></pre>
  
  <p>At an user action, I want to go back to the first view. This is what I did:</p>
  
  <pre><code>-(void)alertView:(UIAlertView *)alertView 
   didDismissWithButtonIndex:(NSInteger)buttonIndex
  {
      [self.navigationController popToRootViewControllerAnimated:NO];
  }
  </code></pre>
  
  <p>When I press a button that call the bellow method, my app goes as expected to the first view. But the problem arises when I press the “Home button” and try to reopen the app. Then, the app crash giving the following error:</p>
  
  <pre><code>2010-12-23 14:33:18.504 test[4549:307] *** -[MapViewController respondsToSelector:]: message sent to deallocated instance 0x5c26320
  </code></pre>
  
  <p>I understand that I sending a message to an instance of the object that does not exist, but I don’t find where is this happening</p>
  
  <p>Do you have any recommendation?</p>