Explorar o código

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

DreamPiggy %!s(int64=6) %!d(string=hai) anos
pai
achega
9b4e6286fc
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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 {