UITableViewCell重新加载导致内存泄漏

时间:2012-06-12 02:48:00

标签: ios

我的代码是

- (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错误内存泄漏48个字节。 每次调用reloadData时都会累积内存泄漏。

欢迎来到任何进军

1 个答案:

答案 0 :(得分:0)

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

以下是一些更多信息:http://openradar.appspot.com/11081198