I am using custom cells and I call loadNibNamed:
. This seems to cause a memory leak and I am not sure how to solve it. If I set the top level objects to nil
afterwards, I still get the leak.
topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"customCell" owner:self options:nil];
I then do this
for (id currentObject in topLevelObjects){
if ([currentObject isKindOfClass:[UITableViewCell class]]){
cell = (CustomCell *) currentObject;
break;
}
}
and then mutate the properties on the cell.
The custom cell has a strong reference to a property, it is not a circular reference so I am not sure if this is the issue. What is the correct way to stop this abandoned memory when using ARC?