Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CoreData model objects in ARC uses retain

When I create the model objects for my entity in CoreData in ARC mode, it generates retain instead or strong. So does retain work and compiles in ARC mode also? I thought in ARC mode we cannot use release, autorelease and retain keywords?

like image 394
theiOSguy Avatar asked Jun 01 '12 16:06

theiOSguy


People also ask

What is a model object in core data?

Data models and model objects are the bread and butter of any Core Data application. We would like to encourage you not to jump to convenience wrappers right away, but to embrace working with managed object subclasses and objects.

What is core data in Java?

Core Data uses a schema called a managed object model — an instance of NSManagedObjectModel. In general, the richer the model, the better Core Data is able to support your application.

Where can I find the core data data model?

If you're looking for a more extensive and step-by-step overview, we recommend you read through Apple's Core Data Programming Guide . The Core Data data model (stored in the *.xcdatamodel file) is where the data types ("Entities" in Core Data) are defined.

What is core data model in Xcode?

Data Model. The Core Data data model (stored in the *.xcdatamodel file) is where the data types (“Entities” in Core Data) are defined. Mostly we will define a data model using Xcode’s graphical interface, but it’s equally possible to create the whole thing in code.


1 Answers

Do you mean that it generates a @property declaration like this?

@property (nonatomic, retain) MyObject *object;

The retain property attribute means strong under ARC.

4.1.1. Property declarations

like image 52
rob mayoff Avatar answered Oct 03 '22 18:10

rob mayoff