Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor modification to better support garbage collection (draining aut…

…orelease pools instead of releasing them).
  • Loading branch information...
commit d5e19166599e1aa3092c6048ac0ef42808a9a18c 1 parent d4ce025
@robbiehanson robbiehanson authored
View
BIN  Benchmarking/Results/Lumberjack Benchmark (iPhone 3GS).ograph
Binary file not shown
View
8 Lumberjack/DDFileLogger.m
@@ -103,7 +103,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath
[self deleteOldLogFiles];
- [pool release];
+ [pool drain];
};
dispatch_async([DDLog loggingQueue], block);
@@ -570,7 +570,7 @@ - (void)setMaximumFileSize:(unsigned long long)newMaximumFileSize
maximumFileSize = newMaximumFileSize;
[self maybeRollLogFileDueToSize];
- [pool release];
+ [pool drain];
};
if (dispatch_get_current_queue() == loggerQueue)
@@ -676,7 +676,7 @@ - (void)setRollingFrequency:(NSTimeInterval)newRollingFrequency
rollingFrequency = newRollingFrequency;
[self maybeRollLogFileDueToAge:nil];
- [pool release];
+ [pool drain];
};
if (dispatch_get_current_queue() == loggerQueue)
@@ -796,7 +796,7 @@ - (void)rollLogFile
dispatch_block_t block = ^{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[self rollLogFileNow];
- [pool release];
+ [pool drain];
};
dispatch_async([DDLog loggingQueue], block);
View
16 Lumberjack/DDLog.m
@@ -235,7 +235,7 @@ + (void)addLogger:(id <DDLogger>)logger
[self lt_addLogger:logger];
- [pool release];
+ [pool drain];
};
dispatch_async(loggingQueue, addLoggerBlock);
@@ -265,7 +265,7 @@ + (void)removeLogger:(id <DDLogger>)logger
[self lt_removeLogger:logger];
- [pool release];
+ [pool drain];
};
dispatch_async(loggingQueue, removeLoggerBlock);
@@ -293,7 +293,7 @@ + (void)removeAllLoggers
[self lt_removeAllLoggers];
- [pool release];
+ [pool drain];
};
dispatch_async(loggingQueue, removeAllLoggersBlock);
@@ -450,7 +450,7 @@ + (void)queueLogMessage:(DDLogMessage *)logMessage synchronously:(BOOL)flag
[self lt_log:logMessage];
- [pool release];
+ [pool drain];
};
if (flag)
@@ -513,7 +513,7 @@ + (void)flushLog
[self lt_flush];
- [pool release];
+ [pool drain];
};
dispatch_sync(loggingQueue, flushBlock);
@@ -657,7 +657,7 @@ + (void)lt_main:(id)ignore
[[NSRunLoop currentRunLoop] run];
- [pool release];
+ [pool drain];
}
#endif
@@ -890,7 +890,7 @@ + (void)lt_log:(DDLogMessage *)logMessage
[currentNode->logger logMessage:logMessage];
- [pool release];
+ [pool drain];
};
dispatch_group_async(loggingGroup, currentNode->loggerQueue, loggerBlock);
@@ -913,7 +913,7 @@ + (void)lt_log:(DDLogMessage *)logMessage
[currentNode->logger logMessage:logMessage];
- [pool release];
+ [pool drain];
};
dispatch_sync(currentNode->loggerQueue, loggerBlock);
Please sign in to comment.
Something went wrong with that request. Please try again.