-
Bug
-
Resolution: Done
-
Major
-
None
-
None
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.