How to deploy to Snow Leopard with ARC enabled

拥有回忆 提交于 2019-11-28 09:21:56

You set the SDK to 10.7 but the Deployment Target to 10.6.

Keep in mind:

While it's possible to build programs using ARC that run on Mac OS X 10.6 and iOS 4, zeroing weak references are not available on those OSes. All weak references must be __unsafe_unretained here. Because non-zeroing weak references are so dangerous, this limitation significantly decreases the attractiveness of ARC on those OSes in my view.

Source: Automatic Reference Counting

You might find PLWeakCompatibility useful. It allows you to use __weak variables on iOS 4 and OS X 10.6.

Source code here: https://github.com/plausiblelabs/PLWeakCompatibility
More info at http://www.mikeash.com/pyblog/introducing-plweakcompatibility.html

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