@property definitions with ARC: Is strong default now?

可紊 提交于 2019-11-28 22:04:20

问题


Just running the ARC refactoring tool on the new xcode 4.3.1 and noticed that my (nonatomic, retain) properties are being swapped out for just (nonatomic) instead of (nonatomic, strong) like in the previous xcode.

My code seems to run fine after this change so I am assuming that it is defaulting to strong anyway, anyone know why things have changed with the ARC converter?


回答1:


Yes, strong is the default in Xcode 4.3 and later. It's documented both in the LLVM docs and in Apple's guides to using properties and working with ARC.




回答2:


When the property is a basic type, the default value is assign, when the property is a object type, the default value is strong



来源:https://stackoverflow.com/questions/9773604/property-definitions-with-arc-is-strong-default-now

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!