Skip to content

Commit

Permalink
destroy pthread_mutex on dealloc: #30
Browse files Browse the repository at this point in the history
  • Loading branch information
ibireme committed Mar 2, 2016
1 parent 5bd43d5 commit f433c34
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions YYCache/YYMemoryCache.m
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ - (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidEnterBackgroundNotification object:nil];
[_lru removeAll];
pthread_mutex_destroy(&_lock);
}

- (NSUInteger)totalCount {
Expand Down

0 comments on commit f433c34

Please sign in to comment.