Automatic Reference Counting,自动引用计数,即ARC,可以说是WWDC2011和iOS5所引入的最大的变革和最激动人心的变化。ARC是新的LLVM 3.0编译器的一项特性,使用ARC,可以说一举解决了广大iOS开发者所憎恨的手动内存管理的麻烦。

在工程中使用ARC非常简单:只需要像往常那样编写代码,只不过永远不写retain,releaseautorelease三个关键字就好~这是ARC的基本原则。当ARC开启时,编译器将自动在代码合适的地方插入retainreleaseautorelease,而作为开发者,完全不需要担心编译器会做错(除非开发者自己错用ARC了)。

但如果要手动内存管理,则可以将ARC禁用。该设置的xcode版本为9.1。

然后可能需要重新编译下项目:

xcode禁用ARC(Automatic Reference Counting)的更多相关文章

  1. JSONKit does not support Objective-C Automatic Reference Counting(ARC) / ARC forbids Objective-C objects in struct

    当我们在使用JSONKit处理数据时,直接将文件拉进项目往往会报这两个错“JSONKit   does not support Objective-C Automatic Reference Coun ...

  2. iOS开发 JSonKit does not support Objective-C Automatic Reference Counting(ARC)

    有使用JSonKit的朋友,如果遇到“JSonKit does not support Objective-C Automatic Reference Counting(ARC)”这种情况,可参照如下 ...

  3. ARC(Automatic Reference Counting )技术概述

    此文章由Tom翻译,首发于csdn的blog 转自:http://blog.csdn.net/nicktang/article/details/6792972 Automatic Reference ...

  4. [转]关于NSAutoreleasePool' is unavailable: not available in automatic reference counting mode的解决方法

    转载地址:http://blog.csdn.net/xbl1986/article/details/7216668 Xcode是Version 4.2 Build 4D151a 根据Objective ...

  5. not available in automatic reference counting mode

    UncaughtExceptionHandler.m:156:47: 'autorelease' is unavailable: not available in automatic referenc ...

  6. 错误解决:release' is unavailable: not available in automatic reference counting mode

    解决办法: You need to turn off Automatic Reference Counting. You do this by clicking on your project in ...

  7. error: 'release' is unavailable: not available in automatic reference counting,该怎么解决

    编译出现错误: 'release' is unavailable: not available in automatic reference counting mode.. 解决办法: You nee ...

  8. [转]error: 'retainCount' is unavailable: not available in automatic reference counting mode

    转载地址:http://choijing.iteye.com/blog/1860761   后来发现是编译选项的问题:   1.点击工程名 打开编译选项 2.在编译选项中,选择Bulid Settin ...

  9. Welcome-to-Swift-16自动引用计数(Automatic Reference Counting)

    Swift使用自动引用计数(ARC)来跟踪并管理应用使用的内存.大部分情况下,这意味着在Swift语言中,内存管理"仍然工作",不需要自己去考虑内存管理的事情.当实例不再被使用时, ...

随机推荐

  1. [leetcode-914-X of a Kind in a Deck of Cards]

    In a deck of cards, each card has an integer written on it. Return true if and only if you can choos ...

  2. ASP.NET MVC 4 内容映射

    文章:ASP.NET MVC 4 内容映射 地址:https://msdn.microsoft.com/zh-cn/library/gg416514(v=vs.108).aspx 模型-视图-控制器 ...

  3. DNS测试工具的使用(了解)

    dig命令, host命令, nslookup命令,rndc命令 dig命令(直接测试DNS性能,不会查询/etc/hosts文件) dig [-t RR_TYPE] name [@SERVER] [ ...

  4. QMap使用

    版权声明:若无来源注明,Techie亮博客文章均为原创. 转载请以链接形式标明本文标题和地址: 本文标题:QMap使用     本文地址:https://www.techieliang.com/201 ...

  5. 第二周:PSP&进度条

    PSP: 一.词频统计改进 1.表格:     C类型 C内容 S开始时间 E结束时间 I时间间隔 T净时间(mins) 预计花费时间(hrs) 学习 <构建之法>.Java 8:46 1 ...

  6. mysql子查询批量找id最大的

    $sql = "select a.id as max_id,a.uid from(SELECT `uid`, idFROM (`users_level_change_log`)WHERE ` ...

  7. mybatis update数据时无异常但没更新成功;update异常时如数据超出大小限制,造成死锁

    没更新的问题原因: sqlSession.commit(); 没执行commit,但官方文档里有这样的描述:“默认情况下 MyBatis 不会自动提交事务,除非它侦测到有插入.更新或删除操作改变了数据 ...

  8. linux下c/c++的文件操作

    opendir,readdir,closedir, stat()查询文件状态 open(), O_TRUNC这个Flag会把打开的文件清零... 文件锁:fcntl, F_GETLK , F_SETL ...

  9. 微信小程序 功能函数 touch触摸计时

    shiFN:function(e){ // touchstart // touchend let that=this; let n=0; // 判断是开始还是结束的参数 let textTure = ...

  10. jquery mobiscroll 滑动、滚动

    mobiscroll : 滑动选择 2.13.2版本免费,官网(mobiscroll.com)收费 先从官方下载2.13.2体验版下来,查看例子结合官方API学习( http://docs.mobis ...