tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject Re: Leak in Tomcat 7.0.11: a java.util.Timer seems to leave a timerThread in the JVM, and Tomcat says "...has failed to stop it. This is very likely to create a memory leak"
Date Sat, 30 Jul 2011 17:05:35 GMT
2011/7/30 Brian Braun <>:
> Oh, I forgot to mention that before I cancel() the timer, I iterate on all
> the tasks and cancel them. I guess that guarantees that everything has
> finished.

It does not guarantee anything for the task that is currently being run.

If you look at the Javadoc for TimerTask.cancel():
"(If the task is running when this call occurs,  the task will run to
completion, but will never run again.)"

Best regards,
Konstantin Kolinko

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message