Re: Core Data, using refreshObject:mergeChanges: to trim a portion of my object graph and regain memory... PLEASE HELP!!!!!!!
Re: Core Data, using refreshObject:mergeChanges: to trim a portion of my object graph and regain memory... PLEASE HELP!!!!!!!
- Subject: Re: Core Data, using refreshObject:mergeChanges: to trim a portion of my object graph and regain memory... PLEASE HELP!!!!!!!
- From: Jim Correia <email@hidden>
- Date: Fri, 8 Dec 2006 11:16:08 -0500
Aurélien,
I'm a huge fan of writing sample apps to test things in isolation. In
this particular case, I think your app is a little bit too
simple :-). If you had a "complete" application you'd see the object
be deallocated on the next -[NSManagedObjectContext
processPendingChanges].
On Dec 8, 2006, at 2:56 AM, Aurélien Hugelé wrote:
After I sent the email, I thought about the NSUndoManager. I did
try 2 different things:
// where the MOC is allocated
[[self managedObjectContext] setUndoManager:nil];
and I've tried [[[self managedObjectContext] undoManager]
disableUndoRegistration] too
but it doesn't help!
is disableUndoRegistration (at the very beginning of course) the
right way to "clear the undo stack"?
disableUndoRegistration is the right way to prevent registration with
the undo manager to begin with. (You should make sure all pending
changes are processed before disabling undo, do your work, make sure
pending changes are processed, then re-enabled undo registration.)
-[NSUndoManager removeAllActions] is the way to clear the undo stack.
Jim_______________________________________________
Cocoa-dev mailing list (email@hidden)
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