This is a pre-ARC equivalent of your code
- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
{
Account *account = (Account *)[self.dataSource objectAtIndex:row];
AccountTableCellViewController *controller = [[AccountTableCellViewController alloc] initWithNibName:@"AccountTableCellViewController" bundle:nil ];
controller.account = account;
NSView *result = [[controller view] retain];
[controller release]; /// !!!
return [result autorelease];
}
Your controller is already deallocated at the moment tableView:viewForTableColumn:
returns. You say in comments that you've tried to keep controllers in array but it doesn't help. Please update your question with a corresponding sections of the code, because something is wrong here.