So, your problem is that βwhen you add too much activity on the stack, the application gradually throws an OOM exceptionβ, and you think that the reason may be that it is onDestroyView()not called in the upper fragment when switching.
OnDestroyView ()
Firstly, when you switch from Activity1 to Activity2, most likely onDestroyView()it is not called in your fragment in Activity1, because you did not call finish()in Activity1 after starting Activity2.
, Activity1 backstack, (.. onStop ). Activity1 , . backstack Activity1 . , Activity1 , , "".
onDestroyView() , . backstack/activity.
, (.. fragmentManager.popbackstack() beginTrasaction.remove(...))), Activity1 Activity2 (.. finish()) - onDestroyView() Activity1.
OutOfMemoryException
... , OOM .
, OOM , Activity , , onDestroyView() . , .
, android:launchMode="singleTask" () AndroidManifest.xml. , . OutOfMemory, Activity.
, reset / "". , onNewIntent(...) (reference), , .
:
OutOfMemory: Android Memory Monitor . , - , () .
, - , , (Activity1, ).
, - :

, ( ), . , , , .
,