Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added pending lifecycle events hooks #7225

merged 1 commit into from May 17, 2022

Added pending lifecycle events hooks #7225

merged 1 commit into from May 17, 2022


Copy link

@jsuarezruiz jsuarezruiz commented May 16, 2022

Description of Change

Added pending lifecycle events hooks.

@jsuarezruiz jsuarezruiz added the area/lifecycle 🔁 label May 16, 2022
@rmarinho rmarinho requested a review from mattleibow May 16, 2022

MauiApplication.Current?.Services?.InvokeLifecycleEvents<AndroidLifecycle.OnDestroy>(del => del(this));
Copy link

@mattleibow mattleibow May 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note from the google docs:

Note: do not count on this method being called as a place for saving data! For example, if an activity is editing data in a content provider, those edits should be committed in either onPause() or onSaveInstanceState(Bundle), not here. This method is usually implemented to free resources like threads that are associated with an activity, so that a destroyed activity does not leave such things around while the rest of its application is still running. There are situations where the system will simply kill the activity's hosting process without calling this method (or any others) in it, so it should not be used to do things that are intended to remain around after the process goes away.

@rmarinho rmarinho merged commit a6c12a1 into main May 17, 2022
24 checks passed
@rmarinho rmarinho deleted the fix-6993 branch May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
area/lifecycle 🔁
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants