memory management for dispatch queue &ARC
来源:互联网 发布:pp助手网络连接失败 编辑:程序博客网 时间:2024/06/03 13:34
when reading apple's document on "Memory Management For Dispatch Queue", it's content as follows:
Even if you implement a garbage-collected application, you must still retain and release your dispatch queues and other dispatch objects. Grand Central Dispatch does not support the garbage collection model for reclaiming memory.
so is it need if i am using arc? After studying i found that:
If your deployment target is lower than iOS 6.0 or Mac OS X 10.
You need to use
dispatch_retain
anddispatch_release
on your queue. ARC does not manage them.If your deployment target is iOS 6.0 or Mac OS X 10.8 or later
ARC will manage your queue for you. You do not need to (and cannot) use
dispatch_retain
ordispatch_release
if ARC is enabled. In fact, if you try to use it, it is a compiler error, just like what happen when you call release in earlier SDK.To fix it, you may want to remove the dispatch_release, or use preprocessor:
- memory management for dispatch queue &ARC
- Memory Management of Instance Variables (Non-ARC)
- Memory Management of Instance Variables (ARC)
- 5 Memory Management with Objective-C ARC
- Memory Management for Android Apps
- Dispatch Queue
- Advances in Memory Management for Windows
- 内存管理 Memory Management for Android Apps
- Objective-C Memory Management For Lazy People
- Memory Management Programming Guide for Core Foundation
- dealloc vs ViewDidDissapear for memory management
- Good material for understanding linux memory management
- C# Memory Management for Unity Developers
- Memory Management
- Memory Management
- Memory management
- Memory Management
- Memory management
- OS X Mountain Lion 系统配置 Apache+Mysql+PHP 详细教程
- C++中static_cast, dynamic_cast, const_cast用法/使用情况及区别解析
- ArcGIS Server Flex API连接Googlemap
- 斯坦福大学机器学习课程原始讲义 + 公开课视频
- QT overwrite file
- memory management for dispatch queue &ARC
- Android 开发利用wifi调试
- Java Date and Time系列(一)- 概述
- 编译android ICS错误解决办法
- 通过SaveFileDialog实现保存文件
- css postion的两种属性学习 absolute 和 relative
- mysql问题Can't connect to local MySQL server through socket '/usr/local/mysql/var/mysql.sock'
- 两道递归/回溯好题的分析:printSquares,maxSum
- 寫給大學生的程式技能 Cheatsheets