mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-28 16:42:20 +00:00
Merge pull request #464 from ianolito/lazy-pending-nodes-set
Create pending nodes set lazily
This commit is contained in:
commit
fded84806b
@ -116,8 +116,6 @@ void ASDisplayNodePerformBlockOnMainThread(void (^block)())
|
||||
_contentsScaleForDisplay = ASDisplayNodeScreenScale();
|
||||
|
||||
_displaySentinel = [[ASSentinel alloc] init];
|
||||
|
||||
_pendingDisplayNodes = [[NSMutableSet alloc] init];
|
||||
|
||||
_flags.isInHierarchy = NO;
|
||||
_flags.displaysAsynchronously = YES;
|
||||
@ -1218,6 +1216,10 @@ static NSInteger incrementIfFound(NSInteger i) {
|
||||
{
|
||||
ASDN::MutexLocker l(_propertyLock);
|
||||
|
||||
if (!_pendingDisplayNodes) {
|
||||
_pendingDisplayNodes = [[NSMutableSet alloc] init];
|
||||
}
|
||||
|
||||
[_pendingDisplayNodes addObject:node];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user