svn commit: r1369782 - /cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableProxyHandler.java

[email protected]
Newsgroups gmane.text.xml.cocoon.cvs
Message-ID <[email protected]>
Author: thorsten
Date: Mon Aug  6 11:17:32 2012
New Revision: 1369782

URL: http://svn.apache.org/viewvc?rev=1369782&view=rev
Log:
COCOON-2259 Memory leak in PoolableProxyHandler
As reported by Miguel Valencia and Mercedes Duarte Madiedo the use of
this.componentHolder.set(null);
leads to a memory leak.

Since cocoon2.2 is 1.5 compatible using the remove() method is getting rid of the memory leak. 

Thanks for Miguel and Mercedes for the finding and sharing the solution.


Modified:
    cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableProxyHandler.java

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableProxyHandler.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableProxyHandler.java?rev=1369782&r1=1369781&r2=1369782&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableProxyHandler.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableProxyHandler.java Mon Aug  6 11:17:32 2012
@@ -97,6 +97,6 @@ public class PoolableProxyHandler implem
         		log.debug("no object to put into pool  attributeName=" + attributeName);
         	}
         }
-        this.componentHolder.set(null);
+        this.componentHolder.remove();
     }
-}
\ No newline at end of file
+}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.