title: GCD dispatch_async and NSURLConnection
body: <p>I wanted a quick and easy way to get data from a <code>URL</code> without having to mess with <code>delegates</code>.</p>
  
  <p>Is there anything wrong with the following?</p>
  
  <pre><code>// Use gcd
  dispatch_queue_t queue = dispatch_queue_create("com.dowork", 0);
  dispatch_queue_t main = dispatch_get_main_queue();
  
  //  do the long running work in bg async queue
  // within that, call to update UI on main thread.
  dispatch_async(queue, ^{ 
  
     // Do work in the background
      NSData *response = [NSURLConnection sendSynchronousRequest:serviceRequest returningResponse:&amp;serviceResponse error:&amp;serviceError];
  
     dispatch_async(main, ^{ 
  
         // Update UI
         self.data = response;
         [self.tableView reloadData];
  
  
     });//end
  });//end
  </code></pre>
  
  <p>I thought I read somewhere long ago that using the <code>NSURLConnection</code> synchronous method in a background thread would cause memory leaks.  Is this true?</p>
  
  <p>Are there any issues with the codes that is posted there?  Any issues with assigning the data to <code>self.data</code> within the block?</p>