codelab-android-hilt icon indicating copy to clipboard operation
codelab-android-hilt copied to clipboard

Question: Meaning of Destroyed

Open yschimke opened this issue 3 years ago • 0 comments

https://dagger.dev/hilt/components.html

It bounds the lifetime of scoped bindings between when the component is created and when it is destroyed.

Curious if there is some documentation for what happens when a component is destroyed? Is it released and garbage collected, or is there some lifecycle hooks you can subscribe to in a Module to cleanup?

I'm assuming not, but wanted to confirm because the specific use of Destroyed in docs, suggests something more.

Similar to this question https://stackoverflow.com/questions/65741883/hilt-when-does-object-gets-destroyed-provided-in-applicationcomponent

yschimke avatar Nov 09 '21 18:11 yschimke