From 6ae7fcb9daaf1f1ab8732d1f9f19cf974a67a514 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Wed, 7 Nov 2018 17:52:16 -0800 Subject: [PATCH] Use weakSelf --- Source/ASRunLoopQueue.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/ASRunLoopQueue.mm b/Source/ASRunLoopQueue.mm index d69610924..fd88cafd8 100644 --- a/Source/ASRunLoopQueue.mm +++ b/Source/ASRunLoopQueue.mm @@ -372,7 +372,7 @@ - (instancetype)init // __unsafe_unretained allows us to avoid flagging the memory cycle detector. __unsafe_unretained __typeof__(self) weakSelf = self; void (^handlerBlock) (CFRunLoopObserverRef observer, CFRunLoopActivity activity) = ^(CFRunLoopObserverRef observer, CFRunLoopActivity activity) { - while (_internalQueue.count > 0) { + while (weakSelf->_internalQueue.count > 0) { [weakSelf processQueue]; } };