[UIMutableIndexPath release]: message sent to deallocated instance 0x205a2930
当我尝试执行时,有时会因此错误而崩溃:
[self.detailsTableView reloadData];
cellForRowAtIndexPath 方法在这里:
- (UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
DetailResultCell *cell = (DetailResultCell*) [aTableView dequeueReusableCellWithIdentifier:DETAIL_RESULT_CELL_ID];
if(cell == nil)
{
[[NSBundle mainBundle]loadNibNamed:DETAIL_RESULT_CELL_ID owner:self options:nil];
cell = detailResultCell;
}
cell.detailsResultatViagerViewController = self;
[cell cellWithIndexPath:indexPath andChamp:[[self.resultats objectAtIndex:indexPath.section] objectAtIndex:indexPath.row]];
return cell;
}
我怎样才能避免这种情况?我尝试在周围放置一个 try/catch 块,[self.detailsTableView reloadData];
但崩溃仍然发生......