mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Improve locking around clearContents (#1107)
* Improve locking around clearContents * Add changelog
This commit is contained in:
committed by
GitHub
parent
eb5bd0942b
commit
f759d5cc7d
@@ -590,10 +590,9 @@ static ASDN::StaticMutex& cacheLock = *new ASDN::StaticMutex;
|
||||
- (void)clearContents
|
||||
{
|
||||
[super clearContents];
|
||||
|
||||
__instanceLock__.lock();
|
||||
_weakCacheEntry = nil; // release contents from the cache.
|
||||
__instanceLock__.unlock();
|
||||
|
||||
ASDN::MutexLocker l(__instanceLock__);
|
||||
_weakCacheEntry = nil; // release contents from the cache.
|
||||
}
|
||||
|
||||
#pragma mark - Cropping
|
||||
|
||||
Reference in New Issue
Block a user