Can't get NSManagedObject subclass to release objects
Can't get NSManagedObject subclass to release objects
- Subject: Can't get NSManagedObject subclass to release objects
- From: Rick Mann <email@hidden>
- Date: Fri, 09 Aug 2013 00:59:59 -0700
iOS.
I have a Core Data entity called "Job." It creates a transient object "Processor" and has a strong reference to it. The Processor can consume a fair bit of memory.
A Job also has zero or more Sweeps.
My app has a notion of an active job, of which there's only one at any given time, and there's a strong reference from the main view controller to this activeJob.
I'm having a hard time getting my app to deallocate unreferenced Job objects, at least in my main MOC. I may have fetched a Job and its associated Sweeps, but once I no longer need that job, I want it to go away. It seems that Core Data hangs on to it strongly.
I've tried calling -refreshObject:mergeChanges: on it, but that only seems to reduce the retain count on my object by one. It could be each Sweep holds onto the Job, too, but the examined retain counts seem higher than those would account for.
What I really want is for Core Data to just let my objects go when I'm no longer strongly referencing them. Memory is tight and I need it to purge stuff. Just can't seem to get it to.
--
Rick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden