jconsole是否可以用于识别JNI C ++对象中的内存泄漏? [英] Can jconsole be used to identify memory leaks in JNI C++ objects?

查看:191
本文介绍了jconsole是否可以用于识别JNI C ++对象中的内存泄漏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以识别未释放的C ++分配? C ++调用是使用JNI从我计划附加jconsole的Java应用程序。如果这是可能的,请告诉(无论是在一个导出的转储文件或其他)你已经能够看到未被释放的堆对象。

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.

推荐答案

否。 C ++代码不会从JVM可以看到的任何地方分配内存。 (除非你在谈论从C ++分配的Java对象。)

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

这篇关于jconsole是否可以用于识别JNI C ++对象中的内存泄漏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆