Re: Can't get NSManagedObject subclass to release objects

2013-08-09 Thread Rick Mann
Thanks. There were two great bits of information in there: the MOC references objects weakly, and objects reference related objects strongly (which is broken by the -[refreshObject:merge: false] call). On Aug 9, 2013, at 07:58 , Jerry Krinock wrote: > > On 2013 Aug 09, at 06:53, Dave Fernande

Re: Can't get NSManagedObject subclass to release objects

2013-08-09 Thread Jerry Krinock
On 2013 Aug 09, at 06:53, Dave Fernandes wrote: > However, you CAN force it to turn managed objects into faults. Then in your > override of -[NSManagedObject didTurnIntoFault], you can release the > transient object. Yes, it looks like that and -refreshObject:mergeChanges: are both part of th

Re: Can't get NSManagedObject subclass to release objects

2013-08-09 Thread Dave Fernandes
As Jerry said, you can't force the MOC to release a managed object. However, you CAN force it to turn managed objects into faults. Then in your override of -[NSManagedObject didTurnIntoFault], you can release the transient object. You will have to recreate the transient object on demand if the m

Re: Can't get NSManagedObject subclass to release objects

2013-08-09 Thread Jerry Krinock
On 2013 Aug 09, at 00:59, Rick Mann wrote: > I've tried calling -refreshObject:mergeChanges: on it, but that only seems to > reduce the retain count on my object by one. I presume that Xcode's Product > Profile > Leaks is available in iOS projects. You could run it and make sure you don't h

Can't get NSManagedObject subclass to release objects

2013-08-09 Thread Rick Mann
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 t