0

I am using sdwebimage to display images from web(setimagewithurl method) in tableviews,collectionviews,views etc. When i check the memory usage in instruments, i was struck by cgrasterdata allocation and that is not getting released. This results in crash of the application after using the app for about 10 minutes.(Application uses a lot of images)

Please check image from following link:(instrument reading image) https://f.cloud.github.com/assets/4200747/2469366/81b68f82-aff8-11e3-9876-b6bf02a77d88.png

Any one please help me.

Thank you

1 Answers1

0

Try implementing the below in your UIViewControllers, this should prevent the crash:

- (void) didReceiveMemoryWarning {

    [super didReceiveMemoryWarning];
    [SDWebImageManager.sharedManager.imageCache clearMemory];
}
MuhammadBassio
  • 1,590
  • 10
  • 13
  • Ok, does property reference has anything to do with releasing the memory? I have implemented this one in a sample application and found it was working. But in the application am working, this doesnt seem to be work as memory is not being released, as such the application has a lot of imageviews and they have strong references. – reddevils4life Apr 09 '14 at 12:28