Instruments 告诉我这段代码中存在内存泄漏,但我似乎找不到它....有什么帮助吗?对不起或新手问题。
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
int altoBufferCelda = 26;
Mensaje *msg = (Mensaje *)[model.mensajes objectAtIndex:indexPath.row];
CGSize txtSize = [msg.texto sizeWithFont:[UIFont systemFontOfSize:17.0f] constrainedToSize:CGSizeMake(222, 222) lineBreakMode:UILineBreakModeTailTruncation];
[alturasDinamicas setObject:[NSNumber numberWithFloat:(txtSize.height + altoBufferCelda)] forKey:[NSNumber numberWithInt:indexPath.row]];
return txtSize.height + altoBufferCelda;
}