Skip to content

Commit f1588be

Browse files
authored
feat(ios): cancel image load when unmounted (DylanVann#787)
1 parent 908267f commit f1588be

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ios/FastImage/FFFastImageView.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#import "FFFastImageView.h"
22
#import <SDWebImage/UIImage+MultiFormat.h>
3+
#import <SDWebImage/UIView+WebCache.h>
34

45
@interface FFFastImageView()
56

@@ -228,5 +229,8 @@ - (void)downloadImage:(FFFastImageSource *) source options:(SDWebImageOptions) o
228229
}];
229230
}
230231

231-
@end
232+
- (void)dealloc {
233+
[self sd_cancelCurrentImageLoad];
234+
}
232235

236+
@end

0 commit comments

Comments
 (0)