I have a web application that uses hibernate 3.6.4 and spring 3.2.4 (mvc, tx and security) and works in tomcat 7. Every time I deploy a new version of my application without restarting tomcat, the memory used by tomcat , increases by approximately 50 MB.
I created several heap heaps and analyzed them using the Eclipse Memory Analyzer. I found out that every time I redistributed the application, a new instance of WebappClassLoader was created. But even after I stopped the application with the tomcat manager, WebappClassLoader remains in memory and does not collect garbage. Therefore, after each redeployment, an additional WebappClassLoader remains in memory and uses about 50 MB of memory.
I used the Eclipse memory analyzer to find the reference paths from WebappClassLoader to the GC roots. As a result, I could not find any strong links that could interfere with WebappClassLoaders.

So what supports the viability of WebappClassLoaders? Where else can I research to find out what the WebappClassLoader from the garbage collection is getting in the way?
I thought it might be the finalize () locking method, which prevents the GC from completing garbage collection. But how can I check this?
eztam source share