Skip to content

Commit 5bb64ea

Browse files
committed
Fix the wrong declaration of SDCallbackQueue's block, should be escaping to match GCD block
This may cause the wrong lifecycle for block (earily release)
1 parent 554e05a commit 5bb64ea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

SDWebImage/Core/SDCallbackQueue.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ typedef NS_ENUM(NSUInteger, SDCallbackPolicy) {
4545

4646
/// Submits a block for execution and returns after that block finishes executing.
4747
/// - Parameter block: The block that contains the work to perform.
48-
- (void)sync:(nonnull NS_NOESCAPE dispatch_block_t)block;
48+
- (void)sync:(nonnull dispatch_block_t)block;
4949

5050
/// Schedules a block asynchronously for execution.
5151
/// - Parameter block: The block that contains the work to perform.
52-
- (void)async:(nonnull NS_NOESCAPE dispatch_block_t)block;
52+
- (void)async:(nonnull dispatch_block_t)block;
5353

5454
@end

SDWebImage/Core/SDCallbackQueue.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ + (SDCallbackQueue *)globalQueue {
7979
return queue;
8080
}
8181

82-
- (void)sync:(nonnull NS_NOESCAPE dispatch_block_t)block {
82+
- (void)sync:(nonnull dispatch_block_t)block {
8383
switch (self.policy) {
8484
case SDCallbackPolicySafeExecute:
8585
SDSafeExecute(self.queue, block, NO);
@@ -93,7 +93,7 @@ - (void)sync:(nonnull NS_NOESCAPE dispatch_block_t)block {
9393
}
9494
}
9595

96-
- (void)async:(nonnull NS_NOESCAPE dispatch_block_t)block {
96+
- (void)async:(nonnull dispatch_block_t)block {
9797
switch (self.policy) {
9898
case SDCallbackPolicySafeExecute:
9999
SDSafeExecute(self.queue, block, YES);

0 commit comments

Comments
 (0)