SDWebImage load image then receive memory warning and crash

1.5k Views Asked by At

I use SDWebImage in my app. I have several UIImageView in my viewcontroller, and all of them use setImageWithURL: method(in UIImageView+WebCache.m) load image by URL. There are three images should be load, two images about 520kb, and the little one is 180kb. While I do run it , it will receive memory warning and crash, I have no idea about it. Can anyone help me, thanks!

Here is my code:

    NSDictionary    *data = [respDic objectForKey:@"data"];

    [self.topLeft setImageWithURL:[NSURL URLWithString:[data valueForKey:@"tr_cu_1"]]];
    [self.bottomLeft setImageWithURL:[NSURL URLWithString:[data valueForKey:@"tr_cu_2"]]];
    [self.bottomRight setImageWithURL:[NSURL URLWithString:[data valueForKey:@"tr_cu_3"]]];
0

There are 0 best solutions below