when launch com.android.gallery3d and press back key for about 2000 times i got exception of java.lang.OutOfMemoryError. Dump heap of com.android.gallery3d which is in android 4.0.4.Use MAT to analyse and found java.lang.ref.FinalizerReference was nested called. What could cause this nested called?
android.app.ContextImpl @ 0x418f8c98 android.media.AudioManager @ 0x419495c8 android.media.AudioManager$1 @ 0x41949688 java.lang.ref.FinalizerReference @ 0x419496a8 java.lang.ref.FinalizerReference @ 0x419496e8 java.lang.ref.FinalizerReference @ 0x41949800 java.lang.ref.FinalizerReference @ 0x41949848 java.lang.ref.FinalizerReference @ 0x41949890 java.lang.ref.FinalizerReference @ 0x419498d8 java.lang.ref.FinalizerReference @ 0x41949920 java.lang.ref.FinalizerReference @ 0x419499b0 java.lang.ref.FinalizerReference @ 0x419499f8 java.lang.ref.FinalizerReference @ 0x41949a40 java.lang.ref.FinalizerReference @ 0x41949a88 java.lang.ref.FinalizerReference @ 0x41949ad0 java.lang.ref.FinalizerReference @ 0x4194a5a8 java.lang.ref.FinalizerReference @ 0x4194af48 java.lang.ref.FinalizerReference @ 0x4194b878
Java heap leaks: the classic memory leak, in which Java objects are continuously created without being released. This is usually caused by latent object references.
Yes. Memory leaks can still occur even when you have a GC. For example, you might hold on to resources such as database result sets which you must close manually.
I had these symptoms in my application and it turned out to be related to a memory leak. I used to register a callback from an activity to a singleton object. Destruction of the activity was pending on that of callback.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With