So, I got a little problem with my own UIViewcontroller subclass, it won't get deallocced when I press the back button on the navigation bar. I really have no idea why it won't even call the dealloc method. My other viewcontroller deallocs just fine. Has anyone encountered similar problem before? If you want me to post some code, say as I have no idea why it does this.
detailViewController *detailViewC = [[detailViewController alloc] init];
[detailViewC setItem:[items objectAtIndex:indexPath.row]];
[self.navigationController pushViewController:detailViewC animated:YES];
[detailViewC release];
My init method is here:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}