-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plugin卸載時無法將已經加載的字節從内容中回收掉 #433
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
看了下源碼,
com.github.ltsopensource.tasktracker.runner.plug.PlugManager#unstall
這個方法只是將新增的classloader中對jar包的句柄關閉,因此可以將jar刪除,但是已加載的字節無法壓縮,由於parent\sub classloader的關係存在,gc也無法回收這部分代碼,會造成memory leak
建議
將sub classloader的parent字段用反射方式置爲null,下次gc會回收掉
The text was updated successfully, but these errors were encountered: