For anyone who's trying to read this question, there have been extensive discussions between me and Jonas and the question changed over the course of the discussion several times so there would be no use in restating everything we went through here. If you have problems reading a crash log please refer to this question on stackoverflow! Thank you for your understanding.
Jonas: Here's the code snippet I was referring to in my last comment:
if ([performance.favorites integerValue] == 1) {
UIImage *starImage = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"fav-star" ofType:@"png"]];
cell.favoritesImage.image = starImage;
}
else
{
cell.favoritesImage.image = nil;
}
So if the else
block is executed, would that make the [favoritesImage release]
call crash if a TableViewCell that is not showing the favorites Image is being deallocated?
So I could simply instead of putting it to nil add a random image with alpha set to 0 to have the same effect but not have any memory leaks?