title: NSArray Removeallobject error in ios
body: <p>i am having a array called temparray and have 2 seperate arrays .i have two buttons ,when i tap the first button it lodes the first array to the temp array,and when i tap the second button it lods the second array to the temparray.
  my code is</p>
  
  <pre><code>-(IBAction)_clickbtnlanselmlayalm:(id)sender
  {
      [tempArray removeAllObjects];
      [tempArray addObjectsFromArray:delegate.allSelectedVerseMalayalam];    
      [self.tab reloadData];
  }
  -(IBAction)_clickbtnlanselhindi:(id)sender
  {
      [tempArray removeAllObjects];
      [tempArray addObjectsFromArray:delegate.allSelectedVerseHindi];
      [self.tab reloadData];
  }
  </code></pre>
  
  <p>allSelectedVerseMalayalam and allSelectedVerseHindi are two arrays which lodes from application delegate.after tap the first button it losds the first array and show it in tableview,but when i tap the scrond button i receve a warning in  <code>[tempArray removeAllObjects];</code> programe receiving signal sigrabat.and it crashes the app.then i put <code>[tempArray removeAllObjects];</code> again it crashes.
  whats the problem in my code.please help me to find the eroor.
  thanks in advance.</p>