mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Improve ASRangeController dealloc-safety.
(1) We can't size nodes without a delegate, and if our owning controller has been deallocated, our delegate will be nil. Handle this more gracefully. (2) Our teardown code needs to be executed on the main thread, but it's conceivable that we might hit refcount 0 on a background queue. Force deallocation to occur on the main thread. Closes #27.
This commit is contained in:
@@ -26,7 +26,7 @@ typedef struct {
|
||||
* a working range, and is responsible for handling AsyncDisplayKit machinery (sizing cell nodes, enqueueing and
|
||||
* cancelling their asynchronous layout and display, and so on).
|
||||
*/
|
||||
@interface ASRangeController : NSObject
|
||||
@interface ASRangeController : ASDealloc2MainObject
|
||||
|
||||
/**
|
||||
* Notify the receiver that its delegate's data source has been set or changed. This is like -[UITableView reloadData]
|
||||
|
||||
Reference in New Issue
Block a user