Authored by Bogdan Poplauschi

Attempt to fix #1883 by using a weakSelf reference to remove from callbackBlocks…

… (on the barrierQueue)
@@ -223,8 +223,9 @@ typedef NSMutableDictionary<NSString *, id> SDCallbacksDictionary; @@ -223,8 +223,9 @@ typedef NSMutableDictionary<NSString *, id> SDCallbacksDictionary;
223 } 223 }
224 224
225 - (void)reset { 225 - (void)reset {
  226 + __weak typeof(self) weakSelf = self;
226 dispatch_barrier_async(self.barrierQueue, ^{ 227 dispatch_barrier_async(self.barrierQueue, ^{
227 - [self.callbackBlocks removeAllObjects]; 228 + [weakSelf.callbackBlocks removeAllObjects];
228 }); 229 });
229 self.dataTask = nil; 230 self.dataTask = nil;
230 self.imageData = nil; 231 self.imageData = nil;