after canceling a TimerTask - purge from the Timer list - fix memory leak

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@581736 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2007-10-03 21:55:40 +00:00
parent 7b1fd3484e
commit 1401e69956
1 changed files with 1 additions and 0 deletions

View File

@ -53,6 +53,7 @@ public final class Scheduler {
TimerTask ticket = TIMER_TASKS.remove(task); TimerTask ticket = TIMER_TASKS.remove(task);
if (ticket != null) { if (ticket != null) {
ticket.cancel(); ticket.cancel();
CLOCK_DAEMON.purge();//remove cancelled TimerTasks
} }
} }