当我尝试执行时,我有时会遇到此错误[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;
}
我该如何避免这种情况?我尝试在[self.detailsTableView reloadData];
周围放置一个try / catch块,但崩溃仍然发生......