Instrumentsを使用しているときにデバイス(iOS 5)でアプリケーションをテストしていて、数回のメモリリークがあります。iOS 5 cellForRowAtIndexPath Memory Leak
これは私が(正確なラインの矢印を参照)楽器からにリダイレクトされているコードの一部です:
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
CeldaUltimasFotosViewCell *cell =
(CeldaUltimasFotosViewCell *) [self.tableView
dequeueReusableCellWithIdentifier:@"CeldaUltimasFotosViewCell"];
if (cell == nil) {
- - - - > NSArray *topLevelObjects =
[[NSBundle mainBundle]
loadNibNamed:@"CeldaUltimasFotosViewCell"
owner:nil options:nil];
cell = [topLevelObjects objectAtIndex:0];
}
// Configure the cell...
[[cell titulo] setFont:fuente_titulo];
...
return cell;
}
あなたが見ることができるように、私はAからロードされたカスタムセルを持っていますNIBファイル。セルには3つのファイルがあります(、customCell.h
、customCell.xib
)。これは、ARCを使用したiOS 5であるため、セルコントローラで何かをリリースする必要があるかどうかはわかりません(現在は空ですが、メソッドはありません)。
それは働いているようです。ありがとう、トニー! –