title: Confirmation before deleting row
body: <p>I'm trying to show a <code>UIAlertView</code> before actually deleting a cell from a <code>UITableView</code></p>
  
  <pre><code>NSIndexPath *_tmpIndexPath;
  
  
  - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
  {
      if(editingStyle == UITableViewCellEditingStyleDelete)
      {
          _tmpIndexPath = indexPath;
  
           NSLog(@"%d", indexPath.row); // 2
           NSLog(@"%d", _tmpIndexPath.row); // 2
  
          UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Dete" message:@"Are you sure you want to delete this entry?" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil] autorelease];
          [alert show];
      }
  }
  </code></pre>
  
  <p>So both my logs return the correct path.</p>
  
  <p>I have my view delegating the UIAlertView</p>
  
  <pre><code>- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
  {
      NSLog(@"%d", _tmpIndexPath.row);
      if(buttonIndex == 1)
      {
          NSLog(@"%d", _tmpIndexPath.row);
      }
  }
  </code></pre>
  
  <p>Now I can't figure out why in the <code>clickButtonAtIndex()</code> I'm getting an error when trying to log <code>_tmpIndexPath.row</code></p>
  
  <pre><code> *** -[NSIndexPath row]: message sent to deallocated instance 0x12228e00
  </code></pre>