You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@excalibur.apache.org by sh...@apache.org on 2005/04/16 16:31:26 UTC

svn commit: r161572 - excalibur/trunk/components/thread/impl/src/java/org/apache/avalon/excalibur/thread/impl/DefaultThreadPool.java

Author: shash
Date: Sat Apr 16 07:31:25 2005
New Revision: 161572

URL: http://svn.apache.org/viewcvs?view=rev&rev=161572
Log:
Pathc from: http://issues.apache.org/jira/browse/EXLBR-20
Fixes: DefaultThreadPool extends ThreadGroup. When it is created and added to parent ThreadGroup, ThreadGroup holds reference to it. When dispose is called, parent ThreadGroup still has reference to it and garbage collector can not collect it. It causes memory leak. 

Modified:
    excalibur/trunk/components/thread/impl/src/java/org/apache/avalon/excalibur/thread/impl/DefaultThreadPool.java

Modified: excalibur/trunk/components/thread/impl/src/java/org/apache/avalon/excalibur/thread/impl/DefaultThreadPool.java
URL: http://svn.apache.org/viewcvs/excalibur/trunk/components/thread/impl/src/java/org/apache/avalon/excalibur/thread/impl/DefaultThreadPool.java?view=diff&r1=161571&r2=161572
==============================================================================
--- excalibur/trunk/components/thread/impl/src/java/org/apache/avalon/excalibur/thread/impl/DefaultThreadPool.java (original)
+++ excalibur/trunk/components/thread/impl/src/java/org/apache/avalon/excalibur/thread/impl/DefaultThreadPool.java Sat Apr 16 07:31:25 2005
@@ -73,6 +73,7 @@
     public void dispose()
     {
         m_pool.dispose();
+        this.destroy();
     }
 
     public Object newInstance()



---------------------------------------------------------------------
To unsubscribe, e-mail: scm-unsubscribe@excalibur.apache.org
For additional commands, e-mail: scm-help@excalibur.apache.org