I am confuzed by the memory management of instance members. I have a class with a ivar:
DetailedResultsTableViewController *detailedResultsTableViewControlle
Your @interface is correct, but your implementation slightly wrong:
@implmentation MyClass
//It's good practice to explicitly state the a variable name for this property to use
//The common approach is to use the property name with a leading underscore
//This prevents accidentally accessing the ivar within the class instead of using the accessor methods. You should only access the ivar directly within the accessor methods (which in these case are being created for you by @synthesize), in the designate init method and dealloc
@synthesize detailedResultsTableViewController = _detailedResultsTableViewController;
-(void)dealloc
{
//...
[_detailedResultsTableViewController release];
//...
}
@end
When accessing the property:
myClass.detailedResultsMapViewController = [[[DetailedResultsMapViewController alloc] initWithNibName:@"DetailedResultsMapViewController" bundle:nil] autorelease];
The code that is setting the method does not 'own' the new value therefore it must autorelease.