title: How do I avoid a zombies error with xcode 4.5 w/o ARC?
body: <p>When I run my application, which does not use ARC, in the xcode 4.5.1 (LLDB) debugger with zombies enabled, I get this error twice (2) when calling -[super dealloc] (-[NSObject dealloc]):</p>
  
  <p><strong>* -[V2APIClient class]: message sent to deallocated instance 0x9d865c0
  *</strong> -[V2APIClient class]: message sent to deallocated instance 0x9d865c0</p>
  
  <p>When I run the same application in the xcode 4.4.1 (LLDB) debugger, I get the error message once (1).
  When I run a slightly earlier version of the same application in XCode 4.3.2, I don't get the error message at all (0). I will retry this with the same/newest code.</p>
  
  <p>FYI - This appears to be exactly the same problem as this other post, which has not yet been answered:
  <a href="https://stackoverflow.com/questions/12841172/foo-class-message-sent-to-deallocated-instance-on-super-dealloc">-[Foo class]: message sent to deallocated instance on [super dealloc]</a>)</p>
  
  <p>I attempted to avoid reposting the same question twice, but I was advised to proceed:
  <a href="https://meta.stackexchange.com/questions/152226/avoiding-asking-a-question-thats-already-been-asked">https://meta.stackexchange.com/questions/152226/avoiding-asking-a-question-thats-already-been-asked</a></p>
  
  <p>Also, I also just asked the equivalent question in the Apple Developer Forums:
  <a href="https://devforums.apple.com/thread/171282" rel="nofollow noreferrer">https://devforums.apple.com/thread/171282</a></p>
  
  <p>Finally, here is the essence of my class:</p>
  
  <pre><code>@interface ASIHTTPRequestHandler : NSObject {
    id _error;
  }
  @property (nonatomic,retain) id error;
  @end
  
  @implementation ASIHTTPRequestHandler
  @synthesize error = _error;
  -(id)init
  {
      self = [super init];
      if (self)
      {
          self.error = nil;
      }
      return self;
   }
  
   -(void)dealloc
   {
       self.error = nil;
       [super dealloc];// this is the line that appears to cause the problems
    }
    @end
  </code></pre>
  
  <p>Please help me resolve this problem.
  I don't believe I am violating any memory management rules, but this error seems to imply otherwise. I'm hesitant to check in any new code until I can resolve this problem.</p>
  
  <p>Thanks,
  Chuck</p>
  
  <p>p.s. For the record, here is the calling code:</p>
  
  <pre><code>PanoTourMgrAppDelegate *ptmAppDlgt = [PanoTourMgrAppDelegate getApplicationDelegate];
  Settings *settings = ptmAppDlgt.settings;
  Identification *identification = ptmAppDlgt.identification;
  V2APIClient *v2ApiClient = [[V2APIClient alloc] initWithSettings:settings identification:identification];
  NSDictionary *result = [v2ApiClient get_application_status];
  BOOL success = [v2ApiClient callWasSuccessful:result];
  if (!success)
  {
      id error = v2ApiClient.error;
      NSString *mbTitle = nil;
      NSString *mbMessage=nil;
      if ([error isKindOfClass:[NSString class]])
      {
          mbTitle = @"Application version no longer suppported";
          mbMessage = (NSString*)error;
          [MessageBox showWithTitle:mbTitle message:mbMessage];
      }
  }
  [v2ApiClient release]; // This is the line that indirectly causes the messages above
  </code></pre>