ios - Under ARC, property and declare of Objective-C confused -
Under ARC, if I define an Ivice like this:
@ Interface ObjectA: NSObject {ID A; } @protecti (noncommercial, unsafe_reentended) id a; What is the property of A? Strong or unsafe - request?
It depends on how you implement it
< Li> using @ synthesis A; or @ synthesis A = __a; In this case, you can do this: __ is unsafe_property / , because the details of ownership of the property constitute the details of ownership of ivar 1 . - Manually
a and set . In this situation, the results will depend on the backing variables you choose for implementation. 2 Here is a document which rules the ownership of rules, which is determined by Section 4.1.1.
1 If the associated frequency variable already exists, its ownership merit should be equal to the ownership of the property; Otherwise, the example variable [property] has been created with that merit capability. 2 The specified ownership of a property is preserved in its metadata, but otherwise it is completely conventional, the property is synthesized.
Comments
Post a Comment