felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1705009 - in /felix/trunk/eventadmin/impl: changelog.txt src/main/java/org/apache/felix/eventadmin/impl/tasks/AsyncDeliverTasks.java
Date Thu, 24 Sep 2015 07:42:36 GMT
Author: cziegeler
Date: Thu Sep 24 07:42:36 2015
New Revision: 1705009

URL: http://svn.apache.org/viewvc?rev=1705009&view=rev
Log:
FElIX-5051 - Memory leak in async delivery

Modified:
    felix/trunk/eventadmin/impl/changelog.txt
    felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/AsyncDeliverTasks.java

Modified: felix/trunk/eventadmin/impl/changelog.txt
URL: http://svn.apache.org/viewvc/felix/trunk/eventadmin/impl/changelog.txt?rev=1705009&r1=1705008&r2=1705009&view=diff
==============================================================================
--- felix/trunk/eventadmin/impl/changelog.txt (original)
+++ felix/trunk/eventadmin/impl/changelog.txt Thu Sep 24 07:42:36 2015
@@ -2,6 +2,8 @@ Changes from 1.4.4 to 1.4.6
 ---------------------------
 ** Improvement
     * [FELIX-5006] - EventAdmin threads should be named
+** Bug
+    * [FElIX-5051] - Memory leak in async delivery
 
 
 Changes from 1.4.2 to 1.4.4

Modified: felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/AsyncDeliverTasks.java
URL: http://svn.apache.org/viewvc/felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/AsyncDeliverTasks.java?rev=1705009&r1=1705008&r2=1705009&view=diff
==============================================================================
--- felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/AsyncDeliverTasks.java
(original)
+++ felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/AsyncDeliverTasks.java
Thu Sep 24 07:42:36 2015
@@ -89,7 +89,7 @@ public class AsyncDeliverTasks
             TaskExecuter executer = m_running_threads.get(currentThreadId);
             if ( executer == null )
             {
-                executer = new TaskExecuter(m_running_threads);
+                executer = new TaskExecuter(currentThreadId, m_running_threads);
             }
             synchronized ( executer )
             {
@@ -130,8 +130,11 @@ public class AsyncDeliverTasks
 
         private final Map<Long, TaskExecuter> m_running_threads;
 
-        public TaskExecuter(Map<Long, TaskExecuter> runningThreads) {
+        private final long threadId;
+
+        public TaskExecuter(final long threadId, final Map<Long, TaskExecuter> runningThreads)
{
             m_running_threads = runningThreads;
+            this.threadId = threadId;
         }
 
         public boolean isActive()
@@ -167,7 +170,7 @@ public class AsyncDeliverTasks
                     if ( !running )
                     {
                         this.m_deliver_task = null;
-                        this.m_running_threads.remove(this);
+                        this.m_running_threads.remove(threadId);
                     }
                 }
             } while ( running );



Mime
View raw message