Q:

memory issue after playing png sequence

I am using AnimationDrawable to play a PNG Sequence which works fine.. the problem is after adding this part the application went from using ~7MB of RAM to ~32MB..
I know we can't directly make call to release memory, but isn't there some way to minimise memory use after such Animation..

A:

I think I found a solution.  I fixed the issue by setting the background resource to the last drawable of the sequence, setting the AnimationDrawable to null and then calling the garbage collection
animationDrawable = null;
imageView.setBackgroundResource(R.drawable.last_png);
System.gc();

