Skip to content
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

[FEATURE]支持动态模块的类清理 #783

Closed
dashenbo opened this issue Sep 19, 2022 · 1 comment
Closed

[FEATURE]支持动态模块的类清理 #783

dashenbo opened this issue Sep 19, 2022 · 1 comment
Labels
enhancement New feature or request fixed
Milestone

Comments

@dashenbo
Copy link

请描述您的需求或者改进建议

热插拔模块是常见的设计思路,如插件实现了一个interface,宿主调用插件返回对象并用fastjson序列化,fastjson会对该插件类做cache,如果插件热更新后,老的classloader和类无法被gc掉。希望提供按classloader清理缓存的能力。

image

请描述你建议的实现方案

gson是实例级别缓存,当gson重新实例化后cache即释放。fastjson提供的是静态方法做序列化,建议cache也能按classloader提供机制做清理。

描述您考虑过的替代方案

对您考虑过的任何替代解决方案或功能的描述。

附加信息

如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。

@wenshao
Copy link
Member

wenshao commented Oct 5, 2022

https://github.com/alibaba/fastjson2/releases/tag/2.0.15
问题修复,请用新版本

@wenshao wenshao closed this as completed Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed
Projects
None yet
Development

No branches or pull requests

2 participants