@property definitions with ARC: strong or retain?

前端 未结 4 832
失恋的感觉
失恋的感觉 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-27 15:05

    Before ARC, you have to 'release' an object which is retained. That mean retain has counter part. After ARC you don't need to release. So use strong. Its a visual clue that you don't need to call release.

提交回复
热议问题