- (void)netServiceDidResolveAddress:(NSNetService *)service { dispatch_async(self.downloadQueue, ^{ NSData *data = [self downloadFromRemoteService:service]; dispatch_async(self.storeQueue, ^{ int img = [self.imageStore addImage:data]; dispatch_saync(self.renderQueue, ^{ [自我渲染缩略图:img]; dispatch_async(dispatch_get_main_queue(), ^{ [[self thumbnailViewForId:img] setNeedsDisplay:YES]; }); }); }); }); }
这是Apple WWDC2012《Asynchronous Design Patterns with Blocks, GCD, and》的代码,'self' as strong reference in blocks,这段代码可以吗?或者在这种情况下如何避免泄漏?</p>