小弟,求们帮忙,内存未泄露,但是tableviewcell 数据源刷新内存持续上涨

iOS 码拜 8年前 (2016-03-31) 1106次浏览
 static NSString *TableSampleIdentifier = @”TableSampleIdentifier”;
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:TableSampleIdentifier];
if (cell == nil)
{
cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:TableSampleIdentifier];

//在添加cell时添加边线框
UIView *backView = [[UIView alloc] initWithFrame:cell.frame];
backView.layer.masksToBounds = YES;
backView.layer.cornerRadius = 1.0;
backView.layer.borderWidth = 1.0;
backView.layer.borderColor = [[UIColor lightGrayColor] CGColor];
[cell addSubview:backView];
}

NSUInteger row = [indexPath row];
cell.textLabel.text = [[_chapterList objectAtIndex:row]objectForKey:@”type_name”];
return cell;
这是数据源内代码,向高手们求指导,每次调用[self.tableview reloadData];后内存不断上涨。(ARC环境下)

解决方案

30

看起来还是没问题,你有没有把僵尸对象打开

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明小弟,求们帮忙,内存未泄露,但是tableviewcell 数据源刷新内存持续上涨
喜欢 (0)
[1034331897@qq.com]
分享 (0)