App converted to ARC, now getting warnings about my properties

前端 未结 3 957
野趣味
野趣味 2021-02-07 09:12

I just converted my app to ARC, and while it builds fine, I get like 600 warnings, all pertaining to my properties. Such as:

Default propert

3条回答
  •  遇见更好的自我
    2021-02-07 09:14

    ARC is right. You cannot have no memory-management qualifer; you must say assign, retain (or strong which is the same thing), or weak.

    Previously, assign was the default. But that is probably not what you want, because is it is the worst possible option - it is an old-style non-ARC weak reference. You either want a smart ARC weak reference (goes to nil when the object goes out of existence) or a strong reference (memory-managed for you by ARC).

提交回复
热议问题