문제

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

도움이 되었습니까?

해결책

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

- (void) didReceiveMemoryWarning {

    [super didReceiveMemoryWarning];
    [SDWebImageManager.sharedManager.imageCache clearMemory];
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top