【发布时间】:2013-03-31 06:23:23
【问题描述】:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"LibraryListingCell";
InSeasonCell *cell = (InSeasonCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
[[NSBundle mainBundle] loadNibNamed:@"InSeasonCellView" owner:self options:nil];
cell = [_cell autorelease];
_cell = nil;
}
if(_dataController!=NULL){
Product *productAtIndex = [_dataController objectInListAtIndex:indexPath.row];
// Configure the cell...
if (productAtIndex.name != nil && productAtIndex.week != nil && productAtIndex.image != nil) {
cell.name.text = productAtIndex.name;
cell.week.text = productAtIndex.week;
cell.image.image = productAtIndex.image;
}
}
return cell;
}
cell.name.text cell.week.text cell.image.text 的消息错误。很确定这是一个内存管理错误。据我所知,我已妥善保留和释放。应用程序在启动时会崩溃,有时它会加载一切正常,但是当你滚动它时它会崩溃。任何有关内存管理的帮助或指针表示赞赏。
【问题讨论】:
标签: ios memory-management exc-bad-access lldb