Quote:
Originally Posted by smasher
Do you set a delegate for MKMapview? You should set the delegate property back to nil when you're done with it, otherwise it will keep calling methods on the delegate object even after the delegate object is destroyed.
|
That's exactly what's happening. Yesterday I had a VERY strange problem where a few seconds after backing out of a nav controller view, I'd crash with a call to a deallocated object.
After a lot of fussing around about NavController mishandling my view controllers, I realized that the deallocated object WAS the viewController I'd just popped. It was set as the delegate for a CLLocationManager object that was trying its darndest to report a new location.
Just telling it to stopUpdatingLocation in the controller's -(void)dealloc{ } was enough to stop the problem.