mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[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:
@@ -21,7 +21,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
AS_SUBCLASSING_RESTRICTED
|
||||
@interface ASRunLoopQueue<ObjectType> : NSObject
|
||||
@interface ASRunLoopQueue<ObjectType> : NSObject <NSLocking>
|
||||
|
||||
/**
|
||||
* Create a new queue with the given run loop and handler.
|
||||
@@ -51,11 +51,11 @@ AS_SUBCLASSING_RESTRICTED
|
||||
AS_SUBCLASSING_RESTRICTED
|
||||
@interface ASDeallocQueue : NSObject
|
||||
|
||||
+ (instancetype)sharedDeallocationQueue;
|
||||
@property (class, atomic, readonly) ASDeallocQueue *sharedDeallocationQueue;
|
||||
|
||||
- (void)test_drain;
|
||||
|
||||
- (void)releaseObjectInBackground:(id)object;
|
||||
- (void)releaseObjectInBackground:(id __strong _Nullable * _Nonnull)objectPtr;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user