title: Adding NSNumber Object to NSMutableArray
body: <p>This piece of code causes an error but it should be correct.</p>
  
  <pre><code>(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
      NSNumber *rowNumber = [[NSNumber alloc] initWithInt:indexPath.row];
      [genreArray addObject:rowNumber];
      [self.tableView reloadData];
  }
  </code></pre>
  
  <p><code>genreArray</code> is a <code>NSMutableArray</code></p>
  
  <p>But on touch on a cell I get this error</p>
  
  <pre><code>*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFArray insertObject:atIndex:]: mutating method sent to immutable object'
  *** First throw call stack:
  (0x1c9c012 0x10d9e7e 0x1c9bdeb 0x1d1c9a5 0x1d1c8b0 0x7b4c 0xcd285 0xcd4ed 0xad75b3 0x1c5b376 0x1c5ae06 0x1c42a82 0x1c41f44 0x1c41e1b 0x1bf67e3 0x1bf6668 0x1dffc 0x271d 0x2645)
  libc++abi.dylib: terminate called throwing an exception
  </code></pre>
  
  <p>Has anyone got an idea why this isn't working?</p>