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

Add ActivityController.close that transitions Activity to destroyed state #6864

Merged
merged 1 commit into from Nov 17, 2021

Conversation

copybara-service[bot]
Copy link

Add ActivityController.close that transitions Activity to destroyed state

Update ActivityController to implement AutoCloseable, and add a 'close' method
that is lifecycle-aware and transitions the underlying Activity to the destroyed
state, freeing all resources and making the Activity eligible for gc.

This is a convenient way to ensure that ActivityControllers can be freed without
having to manage the underlying Activity lifecycles.

It also enables ActivityController to be managed using try-with-resources.

@copybara-service copybara-service bot force-pushed the piper_410291892 branch 2 times, most recently from 1be6910 to 936637a Compare November 17, 2021 16:40
@hoisie hoisie force-pushed the piper_410291892 branch 2 times, most recently from 31be693 to 1a350f7 Compare November 17, 2021 20:50
…tate

Update ActivityController to implement AutoCloseable, and add a 'close'
method that is lifecycle-aware and transitions the underlying Activity
to the destroyed state, freeing all resources and making the Activity
eligible for gc.

This is a convenient way to ensure that ActivityControllers can be freed
without having to manage the underlying Activity lifecycles.

It also enables ActivityController to be managed using
try-with-resources.

PiperOrigin-RevId: 410291892
@hoisie hoisie merged commit c1c3c0e into master Nov 17, 2021
@hoisie hoisie deleted the piper_410291892 branch November 17, 2021 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants