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


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

首先,当滚动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行为的真正原因以及如何解决它?
ios ×2
instruments ×1
memory-leaks ×1
objective-c ×1
storyboard ×1
uiscrollview ×1
uitableview ×1