I’m running my app through instruments Allocations tools. Taking snapshots and comparing what memory is being stranded.
Occasionally I find references to this method:
-(Book *) getBook {
return (Book *)[[AppDelegate getCoreDataContext] existingObjectWithID: book_id error:nil];
}
Could this cause the returned Book object to leak?
Notes: I’m use ARC and compiling for 4.2+ iPad
No leak there. That just means that the object is still around. Probably in the ManagedObjectContext cache. Remember that unless you reset the context manually, Core Data will keep NSManagedObjects references around as a quick access mechanism. No worries there. It’ll clean itself up if they become too many.