title: Capture self in block (retain cycles), not always?
body: <p>The following code is from the LazyTableImages sample code provided by Apple (<a href="http://developer.apple.com/library/ios/#samplecode/LazyTableImages/Listings/Classes_RootViewController_m.html#//apple_ref/doc/uid/DTS40009394-Classes_RootViewController_m-DontLinkElementID_12">source here</a>).</p>
  
  <p>In their completion block they have a reference to self which should cause a retain cycle... But I don't get a warning for this in Xcode whereas in similar code of mine I would. </p>
  
  <p>Is this correct?</p>
  
  <p>Perhaps I'm missing a subtlety of this.</p>
  
  <pre><code>- (void)startIconDownload:(AppRecord *)appRecord forIndexPath:(NSIndexPath *)indexPath
  {
      IconDownloader *iconDownloader = [self.imageDownloadsInProgress objectForKey:indexPath];
      if (iconDownloader == nil) 
      {
          iconDownloader = [[IconDownloader alloc] init];
          iconDownloader.appRecord = appRecord;
          [iconDownloader setCompletionHandler:^{
  
              UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
  
              // Display the newly loaded image
              cell.imageView.image = appRecord.appIcon;
  
              // Remove the IconDownloader from the in progress list.
              // This will result in it being deallocated.
              [self.imageDownloadsInProgress removeObjectForKey:indexPath];
  
          }];
          [self.imageDownloadsInProgress setObject:iconDownloader forKey:indexPath];
          [iconDownloader startDownload];  
      }
  }
  </code></pre>