I have a memory leak problem on a Tomcat server.When I delete and redeploy the error message, the following information appears:
The following web applications were stopped (rebooted, not deployed), but their classes from previous launches are still loaded into memory, causing a memory leak (use the profiler to confirm): / myWebApplication
How can I fix it and deploy it as usual? If anyone knows this, please help me.Thank you very much!
Make sure that you implement ServletContextListener and clear all resources (for example, streams, timers, singlets, sleep mode) that can still be active or referenced at the time contextDestroyed () is called.