• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can't get NSManagedObject subclass to release objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Can't get NSManagedObject subclass to release objects
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: Single Click not Called on NSTextAttachment
  • Next by Date: NSToolbar settings not saved
  • Previous by thread: Re: Single Click not Called on NSTextAttachment
  • Next by thread: Re: Can't get NSManagedObject subclass to release objects
  • Index(es):
    • Date
    • Thread