我在下面的代码中得到了泄漏。泄漏百分比@行尾。谁能告诉我问题出在哪里?
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
coustomMessage *cell = (coustomMessage *)[tableView dequeueReusableCellWithIdentifier:@"coustomMessage"];
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"coustomMessage" owner:self options:nil]; (93.1%)
cell = [topLevelObjects objectAtIndex:0];
}
cell.nameLable.text = [self.nameArray objectAtIndex:indexPath.row]; (3.4%)
cell.messageStatusLable.text = [[self.endPointCountArray objectAtIndex:indexPath.row] stringValue]; (3.4%)
return cell;}发布于 2012-01-17 23:13:09
是否确实在XIB文件中设置了与代码中使用的名称相同的"identifier“属性(使用: dequeueReusableCellWithIdentifier:@"coustomMessage")?
https://stackoverflow.com/questions/8896912
复制相似问题