Prototik / HoloEverywhere

NO LONGER MAINTAINED. DEVELOP FOR 4.X+ DUDE.
MIT License
2.18k stars 608 forks source link

Memory leaks #771

Closed Lakedaemon closed 10 years ago

Lakedaemon commented 10 years ago

This might not be related, but since I migrated my code from holoeverywhere 1.6.8 to holoeverywhere 2.0/2.1/latest, I have been experimenting crashes due to out of memory error with gingerbread devices (but not with ICS/JB/KK -> it is probably related to bitmaps)

I recorded a heap dump and took a few screenshot in MAT while investigating the issue, Trying to find if this comes from my code (probably) or from a library (support or holoeverywhere).

It looks like there is a problem with finalizers and/or with bitmaps (in relation with listView/ProgressBar) especially since I use few bitmaps in my app (and they are small) What do you think ?

screenshot from 2014-01-25 11 56 27

screenshot from 2014-01-25 11 58 00

screenshot from 2014-01-25 11 57 21

Prototik commented 10 years ago

It's very funny, but holoeverywhere's widgets doesn't modify glow effect. Anyway I see that ViewRootImpl hold on ListView widget in internal containers, so I cannot fix this issue.

Lakedaemon commented 10 years ago

You are right, the fault didn't lie with holoeverywhere :
I thought that the big 1MB bitmap that I discovered in MAT was a memory leak, but it was actually an android system bitmap (shared by the zygotte process) to provide a nice background for the listviews. Those stackoverflow thread made this clear : http://stackoverflow.com/questions/18594576/android-edgeeffect-appears-to-allocate-a-1-meg-bitmap http://stackoverflow.com/questions/18515647/strange-bitmap-using-1-mb-of-heap