When an action is destroyed due to a configuration change, are its Loaders also destroyed?

In the developer's guide to bootloaders ,

They automatically connect to the last bootloader cursor when it is recreated after a configuration change. Thus, they do not need to re-request their data.

From this blog post on downloaders ,

when an action is destroyed, the action instructs its LoaderManager to destroy and close its loaders (as well as any associated resources, such as the Cursor ).

The question is which one is correct? When an action is destroyed due to a configuration change, what happens to (1) its downloaders (2) resources associated with its downloaders, such as Cursor .

+6
source share
1 answer

As mentioned in this blog post about downloaders , it specifically calls the following:

The best part about bootloaders is that bootloaders save configuration changes.

You will notice that the action is not destroyed when the configuration is changed - as shown in this image : Activity Life Cycle

onDestroy() is called only when the activity ends or is destroyed by the system (i.e. your process dies ).

0
source

Source: https://habr.com/ru/post/989982/


All Articles