title: Clear NSMutableArray for a refresh
body: <p>I have a couple of <code>NSMutableArrays</code> which i need to clear when refreshing the view. However, when I try to clear them with <code>[array removeAllObjects];</code> my tableview crashes due to <code>index beyond bounds error</code>. All i do with the refresh, is clear the arrays and call the same function as in viewDidLoad for filling the tableview. <code>[tableView reloadData]</code> doesn't get called until the very last line of the method.</p>
  
  <p>EDIT: It's highly likely that the issue is this: I use a pull to refresh external lib, and when you scroll up and release the table, it bounces back down and thus the UITableView tries to load the next cell, which it cant because the array is cleared, and it's still being loaded.</p>
  
  <p>Answer: removeAllObjects from the arrays, immediately do a self.tableView reloadData and then continue with the rest.</p>