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

@@ -236,10 +236,10 @@ static std::atomic_bool static_retainsSublayoutLayoutElements = ATOMIC_VAR_INIT(
queue.push_back({sublayout, sublayout.position});
}
NSMutableArray *flattenedSublayouts = [NSMutableArray array];
NSMutableArray *flattenedSublayouts = [[NSMutableArray alloc] init];
while (!queue.empty()) {
const Context context = queue.front();
const Context context = std::move(queue.front());
queue.pop_front();
ASLayout *layout = context.layout;