• 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
CoreData retain/release/delete
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CoreData retain/release/delete


  • Subject: CoreData retain/release/delete
  • From: John Brownlow <email@hidden>
  • Date: Fri, 29 Apr 2005 14:53:44 -0400

I am a long way into a rather complicated CoreData based app right now and I have managed to figure out most of it, including some bodges to handle ordered lists, but one thing is still not totally clear to me.

Let's say on a previous save you have written out a managedObject to the persistent store.

You re-launch the app, and the managedObject is fetched as part of your document.

You edit your document, and delete whatever it is that requires the managedObject. The managed object is released and its retain count falls to 0.

What happens now? I know that the managedObjectContext will retain certain objects with pending changes, so is that what happens here? Is it actually only de-allocated when the MOC saves the next time?

More importantly, what happens to the copy in the persistent store? When the MOC saves, is the persistent store overwritten, and the object effectively deleted from the saved file, or does it hang around and have to be deleted manually using the -deleteObject method?

--
John Brownlow
Deep Fried Films, Inc

http://www.johnbrownlow.com
http://www.pinkheadedbug.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: CoreData retain/release/delete
      • From: Scott Stevenson <email@hidden>
  • Prev by Date: Re: Saving Images with Core Data (i.e., JPEG, TIFF, etc.)
  • Next by Date: Re: NSBezierPath intersection
  • Previous by thread: NSBezierPath and line intersection
  • Next by thread: Re: CoreData retain/release/delete
  • Index(es):
    • Date
    • Thread