• 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: NSArrayController in entity mode and permutations (CoreData question)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController in entity mode and permutations (CoreData question)


  • Subject: Re: NSArrayController in entity mode and permutations (CoreData question)
  • From: vincent habchi <email@hidden>
  • Date: Mon, 12 Apr 2010 19:53:36 +0200

Quincy,
(sorry for the double answer)

> This is likely NOT a Core Data question. Most likely you're not doing your memory management quite correctly. Look here under the heading "Mutable Arrays":
>
> 	http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Collections/Articles/Arrays.html#//apple_ref/doc/uid/20000132-BBCCJBIF
>
> In particular, it says:
>
> "In a managed memory environment, when an object is removed from a mutable array it receives a release message. This means that if an array is the only owner of an object, then the object is deallocated when it is removed. If you want to use the object after its removal, you should therefore typically send it a retain message before it’s removed from the array."

Right. So I inserted the object into another mutable array (that store the permuted objects) *before* actually deleting and reinserting it. Same behavior. To be more specific, everything works right, up to the point where I saved the context and bing, all the objects disappear. That leads me, on the contrary, to believe that memory management is okay, but core data references go away.

Anyhow, I'm trying to solve this using proxy objets that I manipulate instead of the managed objects.

Vincent

 _______________________________________________

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

References: 
 >NSArrayController in entity mode and permutations (CoreData question) (From: vincent habchi <email@hidden>)
 >Re: NSArrayController in entity mode and permutations (CoreData question) (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Disappearing prefs
  • Next by Date: Re: Data managment
  • Previous by thread: Re: NSArrayController in entity mode and permutations (CoreData question)
  • Next by thread: Re: NSArrayController in entity mode and permutations (CoreData question)
  • Index(es):
    • Date
    • Thread