title: Interprete hprof result to solve OutOfMemory on an app
body: <p>I am developed a new android app. This app contains a number of activities ( more than 8). the simple workflow is as follows:</p>
  
  <ol>
  <li>the user launches the app and gets a list of elements</li>
  <li>once he has selected an element, he gets details about this element</li>
  <li>and he returns to the list of elements</li>
  </ol>
  
  <p>My Problem is at the level of the allocation of memory by android. The analysis of hprof file gives me the following result:</p>
  
  <ul>
  <li>at step one, the VM allocated 27M</li>
  <li>when the user gets to step 2, 20M is allocated. 90% of this memory is for <strong>davilk</strong> package. ( see image below)</li>
  <li>when he comes back to the main Activity ( step 3 ), the memory is not freed
  <a href="https://i.stack.imgur.com/NBAZO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NBAZO.png" alt="enter image description here"></a></li>
  </ul>
  
  <p>So, I have 2 questions</p>
  
  <ol>
  <li>Why does <strong>dalvik</strong> package need to allocate another memory space when i move between the activities ?</li>
  <li>Is it possible to correct this ? If yes, how ?</li>
  </ol>
  
  <p>also, I randomly get <code>Out Of Memory Exception</code></p>