I have an activity that hosts a fragment with Gallery inside it. When I start another activity , essentially, I want to free the memory filled with gallery bitmaps.
My fragment is inserted dynamically like this:
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager
.beginTransaction();
if (_promoFragment == null) {
_promoFragment = new TabletPromoFragment();
}
fragmentTransaction.replace(_singlePageContainerId, _promoFragment);
fragmentTransaction.commit();
I even call _promoFragment.onDestroyView in onPause of the activity, but MAT still shows me that there's a Gallery object that holds those references to Bitmaps.
What can you suggest ?
p.s. I can post MAT report if it is more clear.