]
Bela Ban resolved JGRP-1971.
----------------------------
Resolution: Done
Cycling a channel results in leftover timer threads
---------------------------------------------------
Key: JGRP-1971
URL:
https://issues.jboss.org/browse/JGRP-1971
Project: JGroups
Issue Type: Bug
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 3.6.7
When a channel is cycled a few times in the same process (creating a channel and calling
{{destroy()}} on it, there are leftover timer thread.
The reason is that the timer thread pool uses {{LazyThreadFactory}}, which keeps a list
of threads to potentially rename them at runtime. The element are weak references to
threads, but because we don't run out of memory, those refs are never
garbage-collected.
SOLUTION: add a method {{destroy()}} to {{ThreadFactory}}, and {{LazyThreadFactory}}
would simply clear the list when called.