Comment #19 on issue 2367 by jean.deruelle: JDK Classes keep references to Timer even though they are cancelled
http://code.google.com/p/mobicents/issues/detail?id=2367
Ah right my bad I was looking on TimerTask, I still find this ugly as the container goals are meant to make life easier for app developers and operations but I guess it's better than nothing. Please note that the overhead is not that big 2 million tasks takes approx 150 MB of mem and that really takes memory only for long duration tasks As the purge is not a very efficient operation we could have an algorithm to call the purge automatically depending on a ratio of long duration tasks depending on the number of long duration scheduled tasks and hide this completely and reducing the number of times it is called if you are mixing short and long duration cancel tasks
