• 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
Re: Core Data, using refreshObject:mergeChanges: to trim a portion of my object graph and regain memory...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data, using refreshObject:mergeChanges: to trim a portion of my object graph and regain memory...


  • Subject: Re: Core Data, using refreshObject:mergeChanges: to trim a portion of my object graph and regain memory...
  • From: Scott Stevenson <email@hidden>
  • Date: Mon, 4 Dec 2006 03:46:05 -0800


On Nov 30, 2006, at 2:44 AM, Aurélien Hugelé wrote:

But using top, Activity Monitor "Real Memory" column i can see that this has no effect at all!
commenting this code produce the EXACT same amount of memory to be consumed...

This is a bit outside of my area of expertise, but I looks like no one else has responded so I'll do what I can.


The type of thing you see in Activity Monitor is not necessarily the whole story. The kernel's behavior is -- from what I've seen -- more "fluid" than what you're expecting. It also doesn't tell you how, exactly, your application is consuming memory. It might be managed objects, it might be something else.

It's fine as a point of reference, but what you're looking at is so far removed from the behavior of the managed object context that you can't trust this source alone. In other words, your application might already be doing the right thing without you knowing it.

You could loop through some set of the objects and check their status by sending them -isFault and seeing what you get back.

You might also consider experimenting with this method on NSManagedObjectContext:

	-reset
		Returns the receiver to its base state.

	Discussion
		All the receiver's managed objects are "forgotten." If you
		use this method, you should ensure that you also discard
		references to any managed objects fetched using the receiver,
		since they will be invalid afterwards.

I believe it's non-destructive in the sense that it doesn't change any data. It's as if the application had just started up before anything is fetched.

    - Scott_______________________________________________

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


  • Follow-Ups:
    • Re: Core Data, using refreshObject:mergeChanges: to trim a portion of my object graph and regain memory... PLEASE HELP!!!!!!!
      • From: Aurélien Hugelé <email@hidden>
  • Prev by Date: Progressbar does not survive hide/show
  • Next by Date: Re: Bindings Question
  • Previous by thread: Re: Progressbar does not survive hide/show
  • Next by thread: Re: Core Data, using refreshObject:mergeChanges: to trim a portion of my object graph and regain memory... PLEASE HELP!!!!!!!
  • Index(es):
    • Date
    • Thread