Fix warnings and memory issues (#1003)

This commit is contained in:
Michael Schneider
2018-07-03 08:39:49 -07:00
committed by GitHub
parent 75594affe2
commit d28b17c87f
5 changed files with 9 additions and 6 deletions

View File

@@ -101,7 +101,7 @@ static void runLoopSourceCallback(void *info) {
return;
}
// The scope below is entered while already locked. @autorelease is crucial here; see PR 2890.
NSInteger count;
__unused NSInteger count; // Prevent static analyzer warning if release build
@autoreleasepool {
#if ASRunLoopQueueLoggingEnabled
NSLog(@"ASDeallocQueue Processing: %lu objects destroyed", weakSelf->_queue.size());
@@ -281,7 +281,8 @@ typedef enum {
- (instancetype)init
{
if (self != [super init]) {
self = [super init];
if (self == nil) {
return nil;
}
ASDisplayNodeAssert(self.class != [ASAbstractRunLoopQueue class], @"Should never create instances of abstract class ASAbstractRunLoopQueue.");