@property definitions with ARC: strong or retain?

前端 未结 4 816
失恋的感觉
失恋的感觉 2020-11-27 14:38

Using Xcode 4.2 and ARC, I notice that the auto-generated code for an NSManagedObject still reads like this for properties:

@property (nonatomic         


        
4条回答
  •  有刺的猬
    2020-11-27 15:01

    To answer all three questions in one: retain and strong are synonymous with each other, so both are correct. The documentation states

    retain implies __strong ownership

    strong implies __strong ownership

提交回复
热议问题