-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
长时间使用会产生大内存对象 DeleteOnExitHook #2725
Labels
suggest
Suggest
Comments
zhuangjiaju
added a commit
that referenced
this issue
Oct 28, 2022
这个是个问题 已经在 |
zhuangjiaju
added a commit
that referenced
this issue
Oct 28, 2022
zhuangjiaju
added a commit
that referenced
this issue
Oct 28, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
建议先去看文档
快速开始 、常见问题
建议描述
FileUtil 使用的是 DefaultTempFileCreationStrategy
但是 DefaultTempFileCreationStrategy 的删除策略是 deleteOnExit,对于服务端程序来说,可能会造成java.io.DeleteOnExitHook 大对象,而且无法 GC 掉
TempFileCreationStrategy 的注释也表示:
DefaultTempFileCreationStrategy deletes temporary files when the JVM exits. This may not be suitable for long-running applications that never shut down the JVM since the list of registered files and disk space usage would grow for as long as the JVM is running. You may wish to implement your own strategy that meets the needs of your situation.
The text was updated successfully, but these errors were encountered: