You can use Xcode to generate a managed class of an entity. This class uses @dynamic and doesn’t use ivars.
My question is: Why don’t generated Managed classes have dealloc/release?
Is the answer because there are just no variables? An every time I call a getter/setter method I am actually calling valueForKey from parent ?
The getters and setters are dynamically created at runtime. Whether they call
valueForKey:or not is an implementation detail. But you are correct, there are no ivars in the generated subclass. NSManagedObject itself of course has ivars and its own dealloc.You can read more about the accessors in the Core Data Programming Guide.