title: Is it OK to addToBackStack and replace in a fragment transaction?
body: <p>Any thoughts on the following code?  In my testing I've found the replaced fragment isn't destroyed and the instance is still around when popping the back stack.  Just looking to verify that this is a valid way to use fragment transactions.</p>
  
  <pre><code>getSupportFragmentManager().beginTransaction().addToBackStack(null).replace(frame, fragmentB).commit();
  </code></pre>
  
  <p>My reason for using replace is that it causes the replaced fragment to run it's exit animation.  </p>