4

I have a problem about Memory Leak in Tomcat server.
When I undeploy and redeploy the error message war appeared as below:

The following web applications were stopped (reloaded, undeployed), but their classes from previous runs are still loaded in memory, thus causing a memory leak (use a profiler to confirm): /myWebApplication

How can I fix it and deploy as normally
If anyone known that , please help me .
Thank you very much !

Bulma
  • 990
  • 3
  • 16
  • 35
  • 1
    similar question ! ,http://stackoverflow.com/questions/4565105/is-there-a-way-to-avoid-undeployment-memory-leaks-in-tomcat – invariant Dec 06 '12 at 02:11
  • Duplicate:http://stackoverflow.com/questions/4959042/tomcat-classes-from-previous-run-remains – Cratylus Dec 10 '12 at 18:22

1 Answers1

4

Make sure that you implement a ServletContextListener and clean up any resources (e.g. threads, timers, singletons, hibernate) that may still be active or referenced at the time that contextDestroyed() is called.

Rudi Strydom
  • 334
  • 3
  • 12