title: Automatic Reference Counting not working
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/8408071/why-is-object-not-dealloced-when-using-arc-nszombieenabled">Why is object not dealloc&#39;ed when using ARC + NSZombieEnabled</a>  </p>
  </blockquote>
  
  
  
  <p>I must be doing something wrong here. Compiler is set to Apple LLVM Compiler 3.0 and Objective-C Automatic Reference Counting is set to YES. I also have 3rd Party Software included that requires ARC to be active.</p>
  
  <p>So my basic problem is that my properties don't get released. I have the following header:</p>
  
  <pre><code>@interface ArchiveController : UIViewController &lt;CloseSubviewDelegate&gt; {
    NSArray *journals;
    NSMutableArray *archiveViews;
  }
  
  @property (nonatomic, strong) NSArray *journals;
  @property (nonatomic, strong) NSMutableArray *archiveViews;
  
  ....
  
  @end
  </code></pre>
  
  <p>I synthesized those and initialize the archiveViews array like this:</p>
  
  <pre><code>self.archiveViews = [NSMutableArray array];
  </code></pre>
  
  <p>later I add objects to it, everything works fine; same for the journals array.</p>
  
  <p>I added a dealloc method to check that the ArchiveController gets released:</p>
  
  <pre><code>-(void)dealloc
  {
     DLog(@"dealloc archive controller");
  }
  </code></pre>
  
  <p>which works, but the arrays are never released; Why? If I change the dealloc method to this:</p>
  
  <pre><code>-(void)dealloc
  {
    DLog(@"dealloc archive controller");
    self.archiveViews = nil;
  }
  </code></pre>
  
  <p>everything works fine, but thats not the way it should be, right? I'm a 100 % certain that the array and its objects aren't referenced anywhere else.</p>
  
  <p>And isn't the Preprocessor supposed to handle the insertion of all the retains/releases/deallocs? when I let Xcode generate preprocessed output, nothing seems changed!</p>