Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 VisualVM 对 java 应用程序进行一些内存分析。我有大量的 char 数组和字符串,但我想做的是分析它们属于哪些对象。
我怎样才能做到这一点?
从受监控的应用程序中获取堆转储。在堆转储中,您可以查看char[]和的各个实例,String还可以查看哪些对象引用了它们。
char[]
String