Open rackaracka123 opened 5 months ago
The disposable of ScreenModel, Screens and Navigator is based on the RememberObserver
API.
In the case of the application is destroyed
, only if Compose it self and the hole composition is not destroyed.
This is the same case for any DisposableEffect
. I don't see how we can improve here because we are already using Compose APIs for free resources and listen to lifecycle of the composition.
Consider this code:
On disposed is only called when
Content
leaves the composition and not when the application is destroyed. It would be great ifonDisposed
or maybeonDestroy
would be called to guarantee resources are cleared.