Yes, you have a leak there.
SomeClass *someObj = [self.theFoodFacility copy];
self.childController.theFoodFacilityCopy = someObj;
[someObj release];
This reflects the recommended approach for initializing an object:
SomeClass *someObj = [[SomeClass alloc] init];
self.someProperty = someObj;
[someObj release];
In both cases, the first line returns objects with a hold value of 1, and after that you process it identically.
source
share