2013年10月26日星期六

ios6 dispatch_release arc


http://stackoverflow.com/questions/8618632/does-arc-support-dispatch-queues/8619055#8619055




If your deployment target is lower than iOS 6.0 or Mac OS X 10.8

You need to use dispatch_retain and dispatch_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.

Details

Starting in the iOS 6.0 SDK and the Mac OS X 10.8 SDK, every dispatch object (including adispatch_queue_t) is also an Objective-C object. This is documented in the header file:

没有评论:

发表评论