I made a simple Android memory test application. It has two operations: A and B. A is a simple action with a button that starts B. B consists of a fairly large image (jpg, 1024x768 pixels in mdpi)
When I control this process using DDMS, the heap rises as expected when moving from A to B. When I press (hardware or software using the button super.onBackPressed()) on B and turn on again in A, the heap does not shrink again, even after call garbage collection. Is this expected? Will freed memory B ever be released during the entire process life cycle?
source
share