title: How do I empty and fully free a Grand Central Dispatch queue on release?
body: <p>I have an object, that on initialization creates a <em>serial</em> GCD queue using <code>dispatch_queue_create</code>, and on deallocation calls <code>dispatch_free</code>. During the lifetime of the object, dispatch blocks are added to the queue, however the queue is also stopped and started using <code>dispatch_suspend</code> and <code>dispatch_resume</code>.</p>
  
  <p>My issue is that at one point the object may be released, and when deallocated I would, for the sake of tidiness, like to completely drop the dispatch queue and all <code>dispatch_block_t</code> objects within it, regardless of wether or not the queue is suspended.</p>
  
  <p>As I understand it, the queue will not deallocate until no longer 'needed' in the sense that it is no longer retained by the dispatch blocks within it. This leads me to believe that to deallocate the queue, I have to empty it by allowing blocks within it to execute to termination first.</p>
  
  <p>What is the simplest and most robust way to go about this?</p>