3

I'm told to upgrade the deployment target of an iOS app from iOS 5.1.1 to iOS 6.0. I had several dispatch_queue_t variables in code with corresponding dispatch_release function calls. Compiler did not complain until now that I've raised the deployment target.

I've read several posts related to this (e.g. Does ARC support dispatch queues?) where it is said that dispatch_release is not needed anymore starting from iOS 6.0, but... do I need to replace such function call with another, or have I simply to remove them?

Thanks

Community
  • 1
  • 1
AppsDev
  • 12,319
  • 23
  • 93
  • 186

1 Answers1

3

Basically, you can simply remove them. Compiler does automatically emit code to release dispatch queues and other GCD objects as Objective-C objects. You might need to modify a bit to release dispatch queues if there is retain cycle.

Or you can keep dispatch_release calling with -DOS_OBJECT_USE_OBJC=0 compiler flag as you read.

Community
  • 1
  • 1
Kazuki Sakamoto
  • 13,929
  • 2
  • 34
  • 96