title: Memory management, many images in UICollectionView
body: <p>I'm showing thumbnails of pictures (from the internet) in a UICollectionView in my app. When there are too many (like 20+) and too high res'd images the app simply crashes. I'm sort of an amateur when it comes to memory management. My question is if I should solve this problem via memory management or scaling the images somehow (if I do that I'm suspecting the images won't be in UIViewContentModeScaleAspectFill)?</p>
  
  <p>Right now I'm using <a href="https://github.com/rs/SDWebImage" rel="nofollow">SDWebImage</a> to load my images.</p>
  
  <pre><code>- (UICollectionViewCell*)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
      UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"thumbCell" forIndexPath:indexPath];
      NSString *URL = [self.album.imageURLs objectAtIndex:(indexPath.item+1)];
  
      UIImageView *iv = [[UIImageView alloc] initWithFrame:CGRectMake(80, 80, 277, 58)];
      iv.backgroundColor = [UIColor clearColor];
      iv.opaque = NO;
      iv.contentMode = UIViewContentModeScaleAspectFill;
      [iv setImageWithURL:[NSURL URLWithString:URL]];
      cell.backgroundView = iv;
  
      return cell;
  }
  </code></pre>