为什么关键字“强"在非ARC环境中的属性上使用? [英] Why a keyword "strong" is used on a property in non-ARC environment?
问题描述
我刚刚开始使用Xcode 4.2和iOS5进行开发.创建空的选项卡式应用程序项目后,我注意到在属性上使用了新的关键字"strong".我在这篇文章上读到有关它与在ARC环境中保留替换有关的信息,但是情况并非如此,因为我没有选中使用自动引用计数"复选框.
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.
推荐答案
在非ARC环境中,关键字"Strong"是"retain"的同义词.
The keyword "Strong" is a synonym for "retain" in non-ARC environments.
对于ARC环境,请在此处阅读: http://clang. llvm.org/docs/AutomaticReferenceCounting.html#ownership.spelling.property
For ARC-envs read up here: http://clang.llvm.org/docs/AutomaticReferenceCounting.html#ownership.spelling.property
这篇关于为什么关键字“强"在非ARC环境中的属性上使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!