I have a small android app and I tried looking for memory leaks, so I clicked 'Dump Java Heap' and the first class on the list is FinalizerReference (java.lang.ref). It has over 500 instances, each one with a 'next' and 'prev' to another FinalizerReference.
I know that FinalizerReference comes from objects that implement Object.finalize(), but I don't have an object in my app that implements it. How can I find out why this leak happens and fix it?
For more details about your issue, look at the referent field of your
Finalizer
. Finalizer objects are just extendedReference
s, so you could investigate the content. It will give you information about the finalizing objects.Depending on the content, you will have new leads. It is possible that the finalization process for the pending objects is very long. As you have only one thread processing them all, you may be somehow finalizing more than you can.
Cheers