Android Memory Usage Problem On Possibly Using Activitygroup
Solution 1:
Try tracking memory allocations while application is in use.
Also, holding references to Bitmap Drawables can produce memory leaks. When a Drawable is added to View, a circular reference is created. So when you hold a reference to Bitmap drawable, it further holds a reference to a View and this View can never be GCed.
The easiest way to avoid it is to extract a bitmap from a Bitmap Drawable and hold a reference to it, then when Activity is restarted/reloaded, you create new Bitmap Drawables from this bitmaps. This is how a Photostream example works (described at the end): Faster screen orientation change
Solution 2:
Do you use this layout for the rows of a ListView?
Solution 3:
I was resetting background image everytime activitygroup created by;
background.setBackgroundResource(R.drawable.background);
I removed this and left the description in xml, so problem solved. This method causes memory leaks.
Post a Comment for "Android Memory Usage Problem On Possibly Using Activitygroup"