title: How to completely destroy activity on back pressed?
body: <p>When I press back in my activity , it calls the <code>onSaveInstanceState()</code> and saves the "bundle savedInstanceState" which is right.
  But I want to destroy it or set it to null <strong>only when I press back button or on destroying activity</strong> </p>
  
  <p>I just need <code>onSaveInstanceState()</code> inside my activity for configuration changes.</p>
  
  <p>I think I need to use <code>onBackPressed()</code> but what should I put in it ???</p>
  
  <pre><code>@Override
  public void onBackPressed() {
      // TODO Auto-generated method stub
      super.onBackPressed();
  }
  </code></pre>
  
  <p><strong>Edit :</strong></p>
  
  <p>Lets say I have an activity contains a list when I click an item on the list the activity I mentioned above will start.</p>
  
  <p>My second activity is a master/detail flow activity, When I click an item on the list of this activity it will update the detail's fragment (which is a viewpager here ) and it will save the current choice of the list.</p>
  
  <p>Now when I press back button on second activity, it goes back to the list activity, again if I click a list item it will goes to second activity with the choice I had before pressing back. ( it's kinda save the choice through back stack )</p>
  
  <p><strong>But</strong> I noticed it has nothing to do with savedinstancestate, My second activity will not destroy through back button it will detach and then attach like fragments.</p>
  
  <p>I want to completely destroy second activity when the back button is pressed.</p>
  
  <p><strong>Edit 2 :</strong></p>
  
  <p>When i even close my application through back button and launch it again, and then go to second activity, I see my last state and the item I clicked. ( I used setChoiceMod(...single) on the list )</p>
  
  <p>Thanks for your help.</p>