Reduce usage of autorelease pools (#968)

* Reduce reliance on the autorelease pool

* changelog

* A few more places

* Use it in another place
This commit is contained in:
Adlai Holler
2018-06-15 10:15:25 -07:00
committed by GitHub
parent a4dd19d808
commit a11506564a
26 changed files with 67 additions and 79 deletions

View File

@@ -767,10 +767,10 @@ ASLayoutElementStyleExtensibilityForwarding
NSArray<ASDisplayNode *> *removedSubnodes = [context removedSubnodes];
NSMutableArray<ASDisplayNode *> *insertedSubnodes = [[context insertedSubnodes] mutableCopy];
NSMutableArray<ASDisplayNode *> *movedSubnodes = [NSMutableArray array];
auto movedSubnodes = [[NSMutableArray<ASDisplayNode *> alloc] init];
NSMutableArray<_ASAnimatedTransitionContext *> *insertedSubnodeContexts = [NSMutableArray array];
NSMutableArray<_ASAnimatedTransitionContext *> *removedSubnodeContexts = [NSMutableArray array];
auto insertedSubnodeContexts = [[NSMutableArray<_ASAnimatedTransitionContext *> alloc] init];
auto removedSubnodeContexts = [[NSMutableArray<_ASAnimatedTransitionContext *> alloc] init];
for (ASDisplayNode *subnode in [context subnodesForKey:ASTransitionContextToLayoutKey]) {
if ([insertedSubnodes containsObject:subnode] == NO) {