title: iphone - Objective-C "message sent to deallocated instance
body: <p>I try to get all subviews using this method but when i run the application, i have a  message sent to deallocated instance error.</p>
  
  <pre><code>subviewsArray = self.view.subviews;
  for (int i=0; i &lt;subviewsArray.count; i++) {
      UIView *subview = [subviewsArray objectAtIndex:i];
      if (subview.tag &gt;= 0) {
          [subview removeFromSuperview];
      }
  }
  </code></pre>
  
  <p>And in my .h</p>
  
  <pre><code>@property (nonatomic, strong) NSArray *subviewsArray;
  </code></pre>