Design Element
Comment on "Garbage Collection and Objective-C"
by Scott Stevenson — May 08
Scott, sure you usually just fetch them. But they have a designated initializer, and they otherwise follow the ownership rules of retain/release.

I guess I just don't quite agree. You really don't want to alloc/init managed objects yourself, or really even implement init. You're supposed to use awakeFromFetch, awakeFromInsert, and so on. You also typically don't retain managed objects. In addition, attribute and relationship values are memory-managed internally by things like setPrimitiveValue:forKey:.

So, yes, they are Objective-C objects, but the way you deal with data objects in a Core Data app are not the same as in a conventional app. That's the managed aspect.
Back to "Garbage Collection and Objective-C"
Design Element

Copyright © Scott Stevenson 2004-2015