title: Got memory pressure notification (critical/non-critical) - iOS objective-c
body: <p>Got memory pressure notification (critical/non-critical).</p>
  
  <p>“n” numbers of images loading from API in tableview. But the app is crashing with above mentioned error after few seconds. 
  The current code is, </p>
  
  <pre><code>[post_img sd_setImageWithURL:[NSURL URLWithString:[arr objectAtIndex:i]] placeholderImage:[UIImage imageNamed:@"placeHolder.jpg"] options:SDWebImageRefreshCached];
  </code></pre>
  
  <p>I tried remove cache,         </p>
  
  <pre><code>[[SDImageCache sharedImageCache] removeImageForKey:[arr objectAtIndex:i] fromDisk:YES withCompletion:nil];
  </code></pre>
  
  <p>Also, I tried to fetch images using dispatchqueue, </p>
  
  <pre><code>dispatch_async(dispatch_get_global_queue(0,0), ^{
      NSData * data = [[NSData alloc] initWithContentsOfURL: [NSURL URLWithString: [arr objectAtIndex:i]]];
      if ( data == nil )
          return;
          dispatch_async(dispatch_get_main_queue(), ^{
              post_img.image = [UIImage imageWithData: data];
          });
      });
  </code></pre>
  
  <p>But still I getting the error. </p>