Mantas Varnagiris
02/25/2020, 1:14 PMsetContent {
onActive {
Log.d("ASD", "onActive")
}
onDispose {
Log.d("ASD", "onDispose")
}
}
1. Start app - onActive
is called
2. Press back to leave app - onDispose
NOT called
3. Open app again - onActive
is called
So if we depend on onDispose
to cleanup resources and it's not called - leaks happenshikasd
02/25/2020, 1:16 PM@Model
class.
When subscribing to a static model, onDispose
is not called and onActive
is called twice after restarting activity (with don't keep activities).Mantas Varnagiris
02/25/2020, 1:22 PMmbonnin
02/25/2020, 1:32 PMsetContent {}
in onDestroy
?Mantas Varnagiris
02/25/2020, 1:41 PMComposition
returned by setContent {}
and then call Composition.dispose()
inside onDestroy
in Activitycodeslubber
02/25/2020, 3:28 PMLeland Richardson [G]
02/25/2020, 3:45 PM