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

Commits on Nov 17, 2021

  1. Add ActivityController.close that transitions Activity to destroyed s…

    …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 committed Nov 17, 2021
    3
    Copy the full SHA
    feaded1 View commit details
    Browse the repository at this point in the history