After dumping heap in Android Studio and viewing the created snapshot, there's a field called "dominating size". What does it stand for?
Android Studio heap snapshot analyzer - what does "Dominating size" represent?
Asked Answered
That's the size of that object + everything it keeps alive by direct or indirect references.
I'm not sure about Android Studio, but generally, "dominating" would mean that you only count the objects that are only accessible through your Bitmap objects here -- i.e., if your Bitmap is freed, all of those objects could be freed as well.
In your case, each Bitmap object itself only takes 60 bytes -- but they each have a (separately allocated) pixel buffer of some kind that they're keeping alive.
So it looks like dominating size and retained heap are synonyms –
Lipman
My comment is a little wrong: here is what the documentation says about dominating size and retained heap: developer.android.com/studio/profile/am-hprof.html –
Lipman
© 2022 - 2024 — McMap. All rights reserved.