XCode切换ARC状态

project -> build setting -> Apple LLVM Complier 3.0 – Language -> Objective-C Auto Reference Counting ->
NO 关闭
YES 打开

ARC在编译阶段会产生代码来处理对象引用数,所以启用ARC的话,很多retian和release都不需要了
注意,现在xcode默认启用ARC,关闭的话,要自己补上释放对象的代码哟

Leave a Reply

Your email address will not be published. Required fields are marked *

*