Pages

Wednesday, February 4, 2009

UICachedDeviceWhiteColor leak in iPhone

UICachedDeviceWhiteColor leak looks like a bug in the apple code when cell is loaded from the nib file.

Solution:
in

-(UITableViewCell *) tableView: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath
{
NSAutorelease * pool = [[NSAutorelease alloc] init];

//gets your cell from the nib file

[cell retain];
[pool release];
return cell;
}

1 comment:

  1. This didn't solve the problem. I had to write the custom cell by myself.

    ReplyDelete