Hi Erel,
When an imageView is declared in an Activity and a Bitmap image is assigned to it (either in code or within Layouts), now when an activity is closed and re-opened X number of times, the app will sooner or later "Downsample" the images due to a lack of memory, and then crash. (In my case, I only had to reopen the activity 7 times, before it starts "Downsampling")
It seems like, every time an Activity is created (and Bitmaps are loaded) it creates new instances in memory, and previous instances of the closed activity is still retained and not freed.
A workaround for this, is to declare a Bitmap in the Process_Globals, rather than in the Globals, and then in the Activity_Create, one should check if the the bitmap is already initialized and then reuse that for a View.
But this is not preferable, since with each Activity_Create, a clean slate should be given to the Globals.
When an imageView is declared in an Activity and a Bitmap image is assigned to it (either in code or within Layouts), now when an activity is closed and re-opened X number of times, the app will sooner or later "Downsample" the images due to a lack of memory, and then crash. (In my case, I only had to reopen the activity 7 times, before it starts "Downsampling")
It seems like, every time an Activity is created (and Bitmaps are loaded) it creates new instances in memory, and previous instances of the closed activity is still retained and not freed.
A workaround for this, is to declare a Bitmap in the Process_Globals, rather than in the Globals, and then in the Activity_Create, one should check if the the bitmap is already initialized and then reuse that for a View.
But this is not preferable, since with each Activity_Create, a clean slate should be given to the Globals.