[Minor Breaking API] Make deallocation queues more reliable (#651)

* Make our async deallocation functions take a double pointer, so we can be sure we've released before the queue drains

* Make it a class property

* Fix the return type

* Use a locker

* Improve release notes
This commit is contained in:
Adlai Holler
2017-11-02 10:45:34 -07:00
committed by GitHub
parent 64b6242b9c
commit ff608c92bf
13 changed files with 45 additions and 25 deletions

View File

@@ -332,8 +332,8 @@ static NSString * const kReuseIdentifier = @"_ASCollectionReuseIdentifier";
[self setAsyncDataSource:nil];
// Data controller & range controller may own a ton of nodes, let's deallocate those off-main.
ASPerformBackgroundDeallocation(_dataController);
ASPerformBackgroundDeallocation(_rangeController);
ASPerformBackgroundDeallocation(&_dataController);
ASPerformBackgroundDeallocation(&_rangeController);
}
#pragma mark -