关于NSAutoreleasePool' is unavailable: not available in automatic reference counting mode的解决方法

来源:互联网 发布:淘宝问大家位置换了am 编辑:程序博客网 时间:2024/06/05 17:05

Xcode是Version 4.2 Build 4D151a

根据Objective-c 2.0程序设计上的旧版本的代码会发生NSAutoreleasePool' is unavailable: not available in automatic reference counting mode的错误

需要手动关闭工程中ARC

工程中 Build Settings--->Apple LLVM compiler 3.0 - Language--->Objective-C Automatic Reference Counting 把YES改为NO就可以了

然后就可以编译通过了

原创粉丝点击