Search code examples
ios6releasegrand-central-dispatch

dispatch_release() in ios6


In iOS 6 dispatch_queue is managed by ARC . The complier complains if I use dispatch_release.

If I develop in ios6 sdk , but I still want to deploy the app in ios5, is that ok if I do not write dispatch_release?


Solution

  • If you set your deployment target to iOS 5 (or iOS 5.1, or any version earlier than iOS 6.0), the compiler will let you use dispatch_release without complaining. It only complains if your deployment target is set to iOS 6.0 or later. The SDK version doesn't matter. Only the deployment target version matters.

    For full details, see this answer.