logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grobme...@apache.org
Subject svn commit: r1231361 - in /logging/log4j/trunk/src: changes/changes.xml main/java/org/apache/log4j/MDC.java
Date Fri, 13 Jan 2012 22:39:19 GMT
Author: grobmeier
Date: Fri Jan 13 22:39:19 2012
New Revision: 1231361

URL: http://svn.apache.org/viewvc?rev=1231361&view=rev
Log:
50486 applied patch for memory leak thanks to Yingchun Chen and chahuistle

Modified:
    logging/log4j/trunk/src/changes/changes.xml
    logging/log4j/trunk/src/main/java/org/apache/log4j/MDC.java

Modified: logging/log4j/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/changes/changes.xml?rev=1231361&r1=1231360&r2=1231361&view=diff
==============================================================================
--- logging/log4j/trunk/src/changes/changes.xml (original)
+++ logging/log4j/trunk/src/changes/changes.xml Fri Jan 13 22:39:19 2012
@@ -22,6 +22,7 @@
   <body>
     <release version="1.2.17" date="2010-06-99" description="Maintenance release">
        <action issue="49470">log4j 1.2.17 release preparation</action>
+       <action issue="50486" action="fix">Memoryleak - org.apache.log4j.helpers.ThreadLocalMap</action>
        <action issue="43282" action="fix">Eliminate duplicates in OSGi Import-Package
directive.</action>
        <action issue="48588" action="fix">DOMConfigurator does not close input stream
when configured based on URL.</action>
        <action issue="49078" action="fix">javadoc.jar was missing NOTICE and LICENSE
and contained .svn entries.</action>

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/MDC.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/MDC.java?rev=1231361&r1=1231360&r2=1231361&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/MDC.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/MDC.java Fri Jan 13 22:39:19 2012
@@ -180,7 +180,8 @@ public class MDC {
       Hashtable ht = (Hashtable) ((ThreadLocalMap)tlm).get();
       if(ht != null) {
         ht.clear();
-      } 
+      }
+      ((ThreadLocalMap)tlm).remove();
     }
   }
 



Mime
View raw message