[logback-dev] svn commit: r2076 - logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper

noreply.ceki at qos.ch noreply.ceki at qos.ch
Wed Dec 10 17:29:23 CET 2008


Author: ceki
Date: Wed Dec 10 17:29:23 2008
New Revision: 2076

Modified:
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/AsynchronousCompressor.java

Log:

Fix LBCORE-78. 

AsynchronousCompressor shuts down the executor it created, thus avoiding a memory leak.

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/AsynchronousCompressor.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/AsynchronousCompressor.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/AsynchronousCompressor.java	Wed Dec 10 17:29:23 2008
@@ -13,7 +13,9 @@
   
   public Future<?> compressAsynchronously() {
     ExecutorService executor = Executors.newScheduledThreadPool(1);
-    return executor.submit(new CompressionRunnable(compressor));
+    Future<?> future = executor.submit(new CompressionRunnable(compressor));
+    executor.shutdown();
+    return future;
   }
   
 }


More information about the logback-dev mailing list