title: Automating dealloc/viewDidUnload Objective-C
body: <p>Does these two snippets accomplish the same thing? Assuming I have three IBOutlet UIButtons in my interface file called buttonOne, buttonTwo, and buttonThree:</p>
  
  <pre><code>- (void)dealloc {
      for(UIButton* idx in self.view.subviews)
          [idx release], idx = nil;
  
      [super dealloc];
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>- (void)dealloc {
      [buttonOne release], buttonOne = nil;
      [buttonTwo release], buttonTwo = nil;
      [buttonThree release], buttonThree = nil;
      [super dealloc];
  }
  </code></pre>
  
  <p>Edit:</p>
  
  <p>As ARC sometimes seems like a fix-all alternative to memory management in iOS, I prefer not to use it because a) I feel like I'm cheating and b) if I am not mistaken, it only works on iOS 5 devices.</p>