【问题标题】:UITableViewCell reload causes memory leakUITableViewCell 重新加载导致内存泄漏
【发布时间】:2012-06-12 02:48:00
【问题描述】:

我的密码是

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

    NSString *CellIdentifier1 = [NSString stringWithFormat:@"SimpleCell"];

    UITableViewCell *cell1 = [tableView dequeueReusableCellWithIdentifier:nil];

    if (cell1 == nil) {
        cell1 = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease];

    }
    return cell1;
}

这总是导致 libsystem_c.dylib mallic 内存泄漏 48 字节。 并且每次调用reloadData都会累积内存泄漏。

欢迎大家交流

【问题讨论】:

    标签: ios


    【解决方案1】:

    这是目前 iOS 中存在的与 UIScrollViews 相关的已知错误。 目前您所能做的就是等待系统更新并希望它得到修复。

    这里有更多信息:http://openradar.appspot.com/11081198

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-09
      • 2017-02-28
      • 2011-02-18
      • 1970-01-01
      • 2015-07-06
      相关资源
      最近更新 更多