title: Multiple GCD request in a scrollView
body: <p>I have a scrollView which i load images into while scrolling,and every time it has only 3 pages with images(current previous next ) .
  It works great ,and the memory consumption is low (30-40M) for the iPad .</p>
  
  <p>Problem is, that when i scroll fast(no paging enable), i get a memory warning, even that the memory is low.</p>
  
  <p>I discovered that this is because of multiple GCD requests at once .
  What can be done, in order to eliminate this from happen ?  </p>
  
  <p>One solution i could think of, is to start loading only when scroll view is decelerating , but i am afraid that the UX will be bad with this(now it looks great) , </p>
  
  <p>Another one, is using NSOperation for this- which is a higher level and might be better ?</p>
  
  <p>Another one, is to use AutoreleasePool for the thread request-which i saw in a few articles.</p>
  
  <p>What is the best approach for this ?</p>
  
  <p>Here is the loader, that happens while scrolling (to relevant pages):</p>
  
  <pre><code>  [self downloadImageWithURL:userUrl completionBlock:^(BOOL succeeded, NSData *tdata)
       {
           if (succeeded)
           {
                 //load back
               dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^
                              {
  
                                  UIImage *image=[UIImage imageWithData:tdata scale:1];
                                  if (image)
                                  {
                                      UIGraphicsBeginImageContextWithOptions(image.size, NO, image.scale);
                                      [image drawAtPoint:CGPointZero];
  
                                      image = UIGraphicsGetImageFromCurrentImageContext();
                                      UIGraphicsEndImageContext();
                                   }
  
  
                                  dispatch_async(dispatch_get_main_queue(), ^
                                                 {
  
                                                     //LOAD EASY
                                                     [UIView transitionWithView:view
                                                                       duration:0.1f
                                                                        options:UIViewAnimationOptionTransitionCrossDissolve
                                                                     animations:^
                                                      {
                                                           view.image=nil;
                                                          view.image=image;
  
                                                      }
                                                       completion:nil];
  
                                                 });
                               image=nil;
                              });
           }
       }];
  
  
  }
  </code></pre>