简体   繁体   English

为什么在非ARC环境中的属性上使用关键字“strong”?

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

I just started to develop with with Xcode 4.2 and iOS5. 我刚开始使用Xcode 4.2和iOS5进行开发。 After creating empty Tabbed application project, I have noticed that a new keyword "strong" is used on properties. 创建空的Tabbed应用程序项目后,我注意到在属性上使用了新的关键字“strong”。 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环境中保留替换有关,但事实并非如此,因为我没有选中“使用自动引用计数”复选框。

The keyword "Strong" is a synonym for "retain" in non-ARC environments. 关键字“Strong”是非ARC环境中“retain”的同义词。

For ARC-envs read up here: http://clang.llvm.org/docs/AutomaticReferenceCounting.html#ownership.spelling.property 对于ARC-envs,请阅读: http ://clang.llvm.org/docs/AutomaticReferenceCounting.html#ownership.spelling.property

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM