Can jconsole be used to identify memory leaks in JNI C++ objects?

ε祈祈猫儿з 提交于 2019-12-24 07:01:31

问题


Is it possible to identify the C++ allocations that are unfreed? The C++ calls are made using JNI from my Java application to which I'm planning to attach jconsole. If that is possible please tell how (whether in an exported dump file or otherwise) you have been able to see the heap objects that were left unfreed.


回答1:


No. C++ code doesn't allocate memory from anywhere that the JVM can see. (Unless you're talking about Java objects allocated from C++.)



来源:https://stackoverflow.com/questions/6466882/can-jconsole-be-used-to-identify-memory-leaks-in-jni-c-objects

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!