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: