views:

164

answers:

1

Hi, when I try to release a dictionary I get an exception.

Here is my code:

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    if (!tableDataDictionary)
{
 DebugLog(@"initializing tableDataDictionary");
 tableDataDictionary = [ [NSMutableDictionary alloc] init];
}
}

-(void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    [mainTableView deselectRowAtIndexPath: [mainTableView indexPathForSelectedRow] animated:NO];

    [tableDataDictionary release];
}

How can I fix it?

+5  A: 
Ben Gottlieb