https://kotlinlang.org logo
n

Nthily

04/18/2022, 6:30 PM
When will rememberSaveable's data actually be cleared?
s

Sunil Kumar

04/19/2022, 9:20 AM
It will be cleared only when user manually(but not the system) finishes the activity in which composition is being used, because it saves the state in bundles and bundles are cleared when user manually finishes the activity(mostly when finish() method gets called).
❤️ 1
z

Zach Klippenstein (he/him) [MOD]

04/19/2022, 2:21 PM
Or if you're beneath a
SaveableStateHolder.SaveableStateProvider
, whenever the thing that owns the
SaveableStateHolder
calls
removeState
❤️ 1
3 Views