Reputation: 1047
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 !
Upvotes: 4
Views: 2665
Reputation: 334
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.
Upvotes: 4