Эх сурвалжийг харах

destroy pthread_mutex on dealloc: #30

ibireme 9 жил өмнө
parent
commit
f433c34551

+ 1 - 0
YYCache/YYMemoryCache.m

@@ -352,6 +352,7 @@ static inline dispatch_queue_t YYMemoryCacheGetReleaseQueue() {
     [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
     [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidEnterBackgroundNotification object:nil];
     [_lru removeAll];
+    pthread_mutex_destroy(&_lock);
 }
 
 - (NSUInteger)totalCount {