Quote:
Originally Posted by mebarron
I have a memory management question about sample iPhone app code from Apple, namely:
--------
CoreDataBooks:RootViewController.m
line 255 : // Release the adding managed object context.
line 256 : self.addingManagedObjectContext = nil;
--------
at line #256 the retainCount for addingManagedObjectContext == 1
shouldn't line #256 be the following:
[[self addingManagedObjectContext] release];
Otherwise there is a memory leak, Right?
|
No. addingManagedObjectContext is an instance variable that is released in the dealloc method of the class it's part of.
Regards,
DDA