I am developed a new android app. This app contains a number of activities ( more than 8). the simple workflow is as follows:
- the user launches the app and gets a list of elements
- once he has selected an element, he gets details about this element
- and he returns to the list of elements
My Problem is at the level of the allocation of memory by android. The analysis of hprof file gives me the following result:
- at step one, the VM allocated 27M
- when the user gets to step 2, 20M is allocated. 90% of this memory is for davilk package. ( see image below)
- when he comes back to the main Activity ( step 3 ), the memory is not freed
So, I have 2 questions
- Why does dalvik package need to allocate another memory space when i move between the activities ?
- Is it possible to correct this ? If yes, how ?
also, I randomly get Out Of Memory Exception