UITutableView reloadData的UIMutableIndexPath版本

时间:2013-05-20 13:29:00

标签: ios objective-c uitableview release

当我尝试执行时,我有时会遇到此错误[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块,但崩溃仍然发生......

0 个答案:

没有答案