title: Initialization of NSMutableArray in a loop
body: <p>I have an IBAction like this:</p>
  
  <pre><code>if([checkinArray count]!=0){
          [checkinArray removeAllObjects];
   }
  loop{
      Checkin *checkinsA = [[Checkin alloc] init];
      .....
     [checkinArray addObject:checkinsA];
      [checkinsA release];
  </code></pre>
  
  <p>}</p>
  
  <p>And when checkinArray is not empty I am getting exc bad access error and the app is crashing. What I am doing wrong here? What I am trying to do is to empty the array and then refill ti with updated data.
  PS. The checkin array is declared in .h and is initialized on viewdidload.</p>