且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在我的Java应用程序中查找内存泄漏

更新时间:2023-10-13 08:32:10

内存分析器告诉您,您拥有3个庞大的HashMap数据结构,它们占用大约8GB的RAM ...包括它们引用的闭包键和值对象.看起来它们可能是地图.

The memory analyser is telling you that you have 3 hulking great HashMap data structures occupying about 8GB of RAM ... including the closure key and value objects they refer to. It looks like they might be maps of maps.

这可能是您的内存泄漏的证据.您的应用程序正在向地图数据结构中添加越来越多的条目,并且(大概)没有删除它们.那是内存泄漏的一种形式.

That is probably the evidence of your memory leak. Your application is adding more, and more entries to the map data structures, and (presumably) not removing them. That is a form of memory leak.

(请注意,这是您在上一个问题中没有显示给我们的代码的一部分...)

(Note this is in part of the code that you didn't show us in your previous question ...)