tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Delbecq <>
Subject webappclassloader won't get garbage colelcte, need suggestions (out of memory)
Date Wed, 06 Jun 2007 14:55:14 GMT

Trying to locate memory leak issues (not garbage collected classes &
classloader) i noticed this huge problem:

My webapp uses libraries that spawn helper Threads, using the default
ThreadGroup. Those Helper Thread are subclasses of java.lang.Thread that
override the run(). After stopping properly all those Threads at webapp
shutdown (they have all existed from run() ), it seems those Threads are
still referenced by the main ThreadGroup. Shouldn't tomcat clean the
ThreadGroup when a webapp is undeployed? This indirect directional link
between a system ThreadGroup and WebappClassLoader loader classes
prevents garbage collecting.

Am currently working on a context listener in my webapp that will clean
it at destroy time, but am pretty sure this should be the container's job.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message