Why a keyword “strong” is used on a property in non-ARC environment?

你说的曾经没有我的故事 提交于 2019-12-10 13:23:24

问题


I just started to develop with with Xcode 4.2 and iOS5. After creating empty Tabbed application project, I have noticed that a new keyword "strong" is used on properties. I read on this post about it being related to retain replacement in ARC environment, but it's not the case because I didn't checked "Use Automatic Reference Counting" check box.


回答1:


The keyword "Strong" is a synonym for "retain" in non-ARC environments.

For ARC-envs read up here: http://clang.llvm.org/docs/AutomaticReferenceCounting.html#ownership.spelling.property



来源:https://stackoverflow.com/questions/7790407/why-a-keyword-strong-is-used-on-a-property-in-non-arc-environment

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