0
votes

I am using SDWebImage in UICollectionView and UITableView. In both case, when the number of rows are high, from time to time the memory usage will go tremendous high and I receive a memory warning.

Following is my profile image:

You see, sometimes the memory usage goes to 182M.

The main methods I used of SDWebImage are:

[[SDWebImagePrefetcher sharedImagePrefetcher] prefetchURLs:prefetchURLs];

and

[cell.dishImageView sd_setImageWithURL:[NSURL URLWithString:dish.imageURL]];

The later one is used in a UITableView.

Has anyone run into the same problem?

I'm using iOS 7 and iPhone 5.

1

1 Answers

1
votes

Actually you are using SDWebImage library which store the images in Memory and Disk both.So when image get downloaded it store that image in Memory which will increase your memory that you can observed from Profiler.So try to implement the logic that will write the images only to disk and not store the image in memory.