Troubleshooting a java memory leak: finalization?

前端 未结 5 2192
难免孤独
难免孤独 2020-12-31 05:27

I have a misbehaving application that seems to leak. After a brief profiler investigation, most memory (80%) is held by java.lang.ref.Finalizer instances. I sus

5条回答
  •  -上瘾入骨i
    2020-12-31 06:04

    I have same issue with you (below picture). For our case, it because an object has wait(0) in its finalize and it never get notified, which block the java.lang.ref.Finalizer$FinalizerThread. More reference

    • The Secret Life Of The Finalizer
    • java/lang/ref/Finalizer.java

    objects retained by Finalizer

提交回复
热议问题