How can I figure out what is holding on to unfreed objects?

前端 未结 11 1003
忘了有多久
忘了有多久 2020-12-13 16:11

One of our programs is sometimes getting an OutOfMemory error on one user\'s machine, but of course not when I\'m testing it. I just ran it with JProfiler (on

11条回答
  •  眼角桃花
    2020-12-13 16:25

    No silver bullet there, you have to use the profiler to identify collections that hold those unneeded objects and find the place in code where they should have been removed. As JesperE said, static collections are the first place to look at.

提交回复
热议问题