Skip to content

Commit 1918d1e

Browse files
author
Lucian Boboc
committed
- fixed notification bug where addObserver's object property was self instead nil.
1 parent abfdb92 commit 1918d1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LBCache/LBCacheManager.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ + (LBCacheManager *) sharedInstance
6868
[[NSNotificationCenter defaultCenter] addObserver: lbInstance selector: @selector(memoryWarningAction:) name: UIApplicationDidReceiveMemoryWarningNotification object: [UIApplication sharedApplication]];
6969
[[NSNotificationCenter defaultCenter] addObserver: lbInstance selector: @selector(memoryWarningAction:) name: UIApplicationWillTerminateNotification object: [UIApplication sharedApplication]];
7070

71-
[[NSNotificationCenter defaultCenter] addObserver: lbInstance selector: @selector(increaseDownloadImageCount:) name: LBCacheDownloadImageStartedNotification object: self];
72-
[[NSNotificationCenter defaultCenter] addObserver: lbInstance selector: @selector(decreaseDownloadImageCount:) name: LBCacheDownloadImageStoppedNotification object: self];
71+
[[NSNotificationCenter defaultCenter] addObserver: lbInstance selector: @selector(increaseDownloadImageCount:) name: LBCacheDownloadImageStartedNotification object: nil];
72+
[[NSNotificationCenter defaultCenter] addObserver: lbInstance selector: @selector(decreaseDownloadImageCount:) name: LBCacheDownloadImageStoppedNotification object: nil];
7373

7474
lbInstance.barrierQueue = dispatch_queue_create("com.lucianboboc.LBCache.BarrierQueue", DISPATCH_QUEUE_CONCURRENT);
7575

0 commit comments

Comments
 (0)