jpype-project / jpype

JPype is cross language bridge to allow Python programs full access to Java class libraries.
http://www.jpype.org
Apache License 2.0
1.12k stars 181 forks source link

关于jpype长时间运行,创建的HashMap是JNI Global的,造成内存泄漏如何解决? #904

Closed HunDeMingMingBaiBai closed 3 years ago

HunDeMingMingBaiBai commented 3 years ago

用jpype创建的java对象是JNI Global的,造成jvm的内存泄漏,如何解决? image

Thrameos commented 3 years ago

I am not currently aware of any memory leads in JPype having to do with HashMap.

I would recommend changing HashMap in org.jpype.manager.TypeManager:47 into TreeMap. Then rerun the your test. It may be that the HashMap is associated with your application rather than JPype.

我目前不知道JPype中的任何内存泄漏与HashMap有关。

我建议将org.jpype.manager.TypeManager:47中的HashMap更改为TreeMap。然后重新运行测试。 HashMap可能与您的应用程序关联,而不与JPype关联。

HunDeMingMingBaiBai commented 3 years ago

好的,谢谢您的帮助,我再分析一下dump日志