相关疑难解决方法(0)

每次发布UIScrollView时都会发生内存泄漏

在我的应用程序中,我有一个滚动视图和四个表视图.每次拖动然后释放,我都会得到48字节的泄漏.这确实加起来了.如您所见,两组泄漏都具有相同的来源.以前有人见过这样的泄漏吗?




编辑1:

当我点击泄漏旁边的箭头时,我得到了泄漏信息:

memory-leaks instruments uiscrollview ios

18
推荐指数
1
解决办法
5171
查看次数

iOS5:UITableView滚动性能不佳

首先,当滚动tableview超出范围时,我得到内存泄漏.与此处相同的问题.

此外,我的滚动速度足够快,但在我滚动时它有点颤抖.细胞是可重复使用的.

码:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"Cell";

    Country *country=[[self.items objectAtIndex:[indexPath section]] objectAtIndex:[indexPath row]];
    CountryCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

    cell.imageView.image=[UIImage imageNamed:country.countryFlag];
    cell.countryName.text=country.countryName;
    cell.currencyCode.text=country.code;
    cell.currencyOriginalName.text=country.originalUnitName;

    return cell;
}
Run Code Online (Sandbox Code Playgroud)

应用程序:iOS 5,ARC,Storyboard.

什么可能是这个tableView行为的真正原因以及如何解决它?

objective-c storyboard uitableview ios

4
推荐指数
1
解决办法
2574
查看次数