在刚刚开始学习IOS开发时,最好不要开启ARC,这样有助于学习内存管理,但不少刚刚接触Xcode的朋友可能会发现,当你使用最新版本的Xcode时,敲入release等代码时会提示报错。这是因为系统默认使用自动内存管理,下面就简单说明下如何设置这个ARC。

注解:IOS 5.0以后,xcode4.2之后

        //ARC(auto reference count)-自动引用计数,

        //编译器自动帮我们计算引用计数器,编辑器会知道什么时候做[stu release],

        //Student *stu=[[[Student alloc] init]autorelease]; 

工具/原料

  • Xcode最新版

方法/步骤
1、Now,xcode version 5.1.1 Member of my iMAC. a new Project,you can't Release Memory directorily.Xcode 新版本如何设置ARCXcode 新版本如何设置ARC

  1. 2、Find the Title of this Project left,Center infomation->levels->ARC search...  find the flag->YES turn  to NO...OK!
    Xcode 新版本如何设置ARC
    3、Now,you can Release Memory on you xcode version 5.1.1 member. Attention Please: Way for Other Version on xcode.
    Xcode 新版本如何设置ARC

    Editor:wvqusrtg 2014-11-20;

相关文章:

  • 2021-05-27
  • 2022-12-23
  • 2022-12-23
  • 2021-07-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-24
  • 2021-09-13
  • 2021-10-17
  • 2021-10-29
  • 2021-06-11
  • 2022-12-23
  • 2021-08-14
相关资源
相似解决方案