When I call the popBackStack like:
manager.popBackStack("mybackstack", FragmentManager.POP_BACK_STACK_INCLUSIVE);
will the memory retained by the fragments that belongs to “mybackstack” will be freed?
I have a FragmentActivity that manages a ListFragment. Every time I click on item, the FragmentActivity instantiates a new Fragment which shows some information about the item clicked and then shows a DialogFragment with a Bitmap (that I recycle when the dialog is dismissed). I put the android:configChanges="orientation" in the manifest and override onConfigurationChanged as necessary.
Yes, the memory retained by the fragments will be freed. From the documentation,
and,
Note, however, that there is no guarantee that this memory will be freed immediately.