Dismissing popover, then popToRootViewController, EXC_BAD_ACCESS
<p>I am getting a crash when I <code>popToRootViewController</code>, this is the way I have it set up.</p>

<p>I have: </p>

<pre><code>@property (nonatomic, retain) UIPopoverController *popover;
</code></pre>

<p>in dealloc:</p>

<pre><code>[popover release];
</code></pre>

<p>when a button is pressed</p>

<pre><code>if (self.popover == nil) {
    DetailViewController *detailView = [[[DetailViewController alloc] init] autorelease];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(GoToTest:) name:TestDetailPressed object:detailView];
    self.popover = [[[UIPopoverController alloc] initWithContentViewController:detailView] autorelease];
    self.popover.delegate = self;
    [self.popover presentPopoverFromRect:frame inView:self.scrollView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
</code></pre>

<p>My <code>DetailViewController</code> is essentially just a <code>UITableView</code>.  When a row is selected, I post a notification back to this current class for GoToTest:</p>

<pre><code>- (void)GoToTest:(NSNotification *)notification {
    if ([self.popover isPopoverVisible]) {
        [self.popover dismisspopoverAnimated:YES];
        [self handleDismissedPopover:self.popover];
    }
    [self.navigationController popToRootViewControllerAnimated:NO];
}

- (void)handleDismissedPopover:(UIPopoverController *)popoverController {
    self.popover = nil;
    self.popover.delegate = nil;
    [[NSNotificationCenter defaultCenter] removeObserver:self name:TestDetailPressed object:nil];
}

- (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController {
    [self handleDismissedPopover:popoverController;
}
</code></pre>

<p>When I run it in Instruments, I get the zombie message for</p>

<pre><code> -[UIPopoverController _popoverDismissAnimationCompleted]
</code></pre>

<p>and the <code>UIViewController</code> has a refCt of -1 at that point.</p>
