I have a UIViewController that implements <NSFetchedResultsControllerDelegate, UITableViewDataSource, UITableViewDelegate>
and I present it modally (within a nav controller) from my main view controller. It dismisses itself via:
[self.navigationController.parentViewController dismissModalViewControllerAnimated:YES];
I thought this would dealloc my nav controller and the UIViewController contained within it. However, I put some NSLog statements on the UIViewController methods that implement NSFetchedResultsControllerDelegate and I see that they are getting called even when I do something in the main view controller -- in other words, the UIViewController which is not being shown and which I thought I had been destroyed is still out there somewhere responding to changes in my CoreData model. I presume this is wasteful and would like to avoid it.
What's the best way to really destroy my UIViewController when the user opts to close it?
Thanks.