NSAutoreleasePool' is unavailable: not available in automatic reference counting mode

Above the list of build settings are two sets of buttons. The first set is Basic/All. Clicking the Basic button shows the most commonly accessed build settings. Clicking the All button shows all the build settings.

The second set of buttons is Combined/Levels. The screenshot shows what appears when you click the Levels button. Multiple columns of build settings are visible: default, project, target, and resolved. If you select the project from the build settings editor instead of the target, there is no column for the target. Showing levels allows you to see any changes from the default build settings as well as any differences between project and target build settings.

If you click the Combined button, one column of build settings appears in the editor. The column shows the effective value of each build setting, the value Xcode will use when you build the project. Showing the combined build settings simplifies changing a build setting’s value.

X-code 4.2,苹果引入了自动记算引用数的功能,所以老的项目中

NSAutoreleasePool  * pool = [[NSAutoreleasePool allocinit];是报错的,必须把arc(auto-reference-command)关闭才行,方法如下:

Build settings--->Apple LLVM compiler 3.0- Language--->Objective-C Automatic Reference Counting 将YES改为NO。

如果是ios5 需要在main的头部引入 #import "AppDelegate.h" 才可以解决。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值