Suspending a queue and then discarding your only reference to that queue is unlikely to achieve what you think it should.
In theory, you'd expect that to leak: When you call dispatch_suspend
the current executing task will complete, but any pending tasks would be suspended (and maintaining a strong reference to the queue). Worse, because you discarded your only reference to the queue, you'd never have any way to resume the queue and free up those resources. In theory, you'd leak the queue and any enqueued dispatched blocks (and any objects to which those enqueued blocks have strong references).
In practice, when you do this (remove your last strong reference to a suspended queue in iOS 6+), it will crash. Perhaps iOS should really handle this more gracefully, but nonetheless, it's not surprising that the scenario of removing your last reference to a suspended queue, thereby having no way to resume it, would be problematic.
Bottom line, don't suspend the queue and then try to release it. If you want to cancel your background tasks, you might want to use operation queues rather than Grand Central Dispatch. Operation queues handle cancelable operations more gracefully, and if you use a NSOperation
subclass, you can even write the code to handle the canceling of an operation that might be in progress, too.