Life Span of Objects Managed by Master Data

I observed the following behavior on my NSManagedObject instances.

  • ObjA is an instance of NSManagedObject downloaded from NSManagedObjectContext ContextA.
  • I keep ObjA
  • I get access to PropertyA ObjA (ObjA has no relationship, only basic properties) - everything works fine at this stage
  • I remove ObjA from ContextA
  • I keep ContextA
  • ObjA is not freed (due to the extra save that I performed on it). I can still check it, for example, as saveCount.
  • Access PropertyA ObjA -> I get SIGABRT

I am wondering if CoreData was designed to work or a side effect of my code.

+3
source share
1 answer

, , NSManagedObjects , , . NSManagedObject : " , Core Data ( " ). , , , ( ), .

+2

All Articles