Android - calls a call from an action to destroy a hosted fragment?

I have an "Activity A" that hosts "fragment B". Please confirm that if I call A.finish (), then fragment B will be destroyed. Fragment B will already be added to the fragment manager. I understand that the fragment is sub-activity, but I want to know if I should inform the fragment manager about the release of the fragment in Ondestroy, or did everyone take care of this?

+4
source share
3 answers
but i want to know do i have to tell the fragment manager to 
release the fragment in Ondestroy or is it all taken care of ?

, finish , onDestroy , , , onDestroy .

:

For example, when the activity is paused, so are all fragments in it, 
and when the activity is destroyed, so are all fragments. 
+5

- . , , FragmentManager.

0

, . Android:

, , , , .

0

All Articles