title: iOS 7 app crashes due to a zombie detected by the search display controller
body: <p>With <code>NSZombieEnabled</code> set to <code>YES</code>, my app crashes in simulator and on the device. After profiling using <code>Instruments</code>, I have narrowed down the issue to the search display controller I am using:</p>
  
  <blockquote>
    <p>Zombie Messaged: An Objective-C message was sent to a deallocated
    'UIView' object (zombie) at address: 0x1134fb730"</p>
    
    <p>Event Type  ∆ RefCt RefCt   Timestamp   Responsible Library Responsible Caller 16   Zombie      -1  00:25.897.720   UIKit   -[UISearchDisplayController
    _cleanUpSearchBar]</p>
  </blockquote>
  
  <p>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 <code>nil</code> on <code>viewWillDisappear</code> and I have already tried that.</p>
  
  <pre><code>- (void)viewWillDisappear:(BOOL)animated {
      [super viewWillDisappear:animated];
      self.searchDisplayController.delegate=nil;
      self.searchDisplayController.searchBar.delegate=nil;
  }
  </code></pre>
  
  <p>I would really appreciate any assistance or hints anybody can provide.</p>