I get random (from memory) crashes in my application, so I started to analyze my heap. I noticed that if you switch from Activity A to Activity B, the heap increases (due to lazy loading of many images) from 27 MB to 35 MB. However, when I complete () activity B to return to Activity A, the heap size remains unchanged even when running GC!
It’s annoying that the transition to activity B once again increases the heap to 42 MB. I can do it as times can, and the pile will only increase.
This is the lazy image upload library I am using:
LazyList https://github.com/thest1/LazyList
These are heap screenshots
to: http://i.stack.imgur.com/7eTzm.png
after: http://i.stack.imgur.com/txeC6.png
converted heap dump file available upon request
UPDATE
From my debugging, it seems to be a problem from the LazyList library, but I'm still not 100% sure. Here is a link to people commenting on the library:
https://github.com/thest1/LazyList/issues/20
source
share