Просмотр исходного кода

Fix the crash when using NSCache delegate with SDMemoryCache default implementation on dealloc

DreamPiggy 6 лет назад
Родитель
Сommit
9b4e6286fc
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      SDWebImage/SDImageCache.m

+ 1 - 0
SDWebImage/SDImageCache.m

@@ -42,6 +42,7 @@
 
 - (void)dealloc {
     [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
+    self.delegate = nil;
 }
 
 - (instancetype)initWithConfig:(SDImageCacheConfig *)config {