URLClassLoader Memory Leak Java

2019-09-07 02:19发布

I have been going through a lot of URLClassLoader Memory leak solutions on the internet, but I haven't found any fully working code and precise solution. The closest to a solution I found was this

Any fully functional code or link to it, which uses WeakHashMap() or any other definite way of eliminating memory leak problem on multiple redeploys?

1条回答
闹够了就滚
2楼-- · 2019-09-07 02:57

just add the dependency of class loader leak preventer in your build path. maven dependency for this is :

<!-- For Classloader leak protection -->
        <dependency>
            <groupId>se.jiderhamn</groupId>
            <artifactId>classloader-leak-prevention</artifactId>
            <version>1.8.0</version>
        </dependency>
查看更多
登录 后发表回答