简体   繁体   English

UITableViewCell重载导致内存泄漏

[英]UITableViewCell reload causes memory leak

My codes is 我的密码是

- (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;
}

This always causes libsystem_c.dylib mallic memory leak 48 bytes. 这总是导致libsystem_c.dylib恶意内存泄漏48个字节。 And the memory leak is accumulated each time when call reloadData. 每次调用reloadData时都会累积内存泄漏。

Wel come any commen 欢迎大家光临

It's a known bug present in iOS at the moment relating to UIScrollViews. 目前,这是iOS中与UIScrollViews有关的已知错误。 All you can do at the moment is wait for a system update and hope that it is fixed. 您目前所能做的就是等待系统更新,并希望它已得到修复。

Here is some more information: http://openradar.appspot.com/11081198 这是一些更多信息: http : //openradar.appspot.com/11081198

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM