With NSZombieEnabled
set to YES
, my app crashes in simulator and on the device. After profiling using Instruments
, I have narrowed down the issue to the search display controller I am using:
Zombie Messaged: An Objective-C message was sent to a deallocated 'UIView' object (zombie) at address: 0x1134fb730"
Event Type ∆ RefCt RefCt Timestamp Responsible Library Responsible Caller 16 Zombie -1 00:25.897.720 UIKit -[UISearchDisplayController _cleanUpSearchBar]
I have done a lot of research online (including searching on stack overflow) but have not been able to pinpoint the exact cause. Most people recommend setting the delegates on the search display controller to nil
on viewWillDisappear
and I have already tried that.
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
self.searchDisplayController.delegate=nil;
self.searchDisplayController.searchBar.delegate=nil;
}
I would really appreciate any assistance or hints anybody can provide.