Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 0e4c9c865a0ff19f9a891cab89066056685d859c
Author: Chuck Jazdzewski <chuckj@google.com>
Date: Tue Apr 05 15:22:29 2022
Add ResuableContentHost to control lifetime of reusable content state
Relnote: """Added ResuableContentHost which allows better control over the lifetime
of state created for reusable content. For example, if a sub-composition
is temporarily not in use then the content can be deactivated causing
all the remembered state in the composition to be forgotten triggering,
for example, all disposable effects."""
Test: ./gradlew :compose:r:r:tDUT
Fixes: 220322704
Change-Id: I2c0f297104d425e2bf673debccfe7a1729761593
M compose/runtime/runtime/api/current.ignore
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/tooling/CompositionData.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composables.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composer.kt
M compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/CompositionReusingTests.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt
M compose/runtime/runtime/api/restricted_current.txt
M compose/runtime/runtime/api/current.txt
M compose/runtime/runtime/api/restricted_current.ignore
M compose/runtime/runtime/api/public_plus_experimental_current.txt
https://android-review.googlesource.com/2057009
Branch: androidx-main
commit 0e4c9c865a0ff19f9a891cab89066056685d859c
Author: Chuck Jazdzewski <chuckj@google.com>
Date: Tue Apr 05 15:22:29 2022
Add ResuableContentHost to control lifetime of reusable content state
Relnote: """Added ResuableContentHost which allows better control over the lifetime
of state created for reusable content. For example, if a sub-composition
is temporarily not in use then the content can be deactivated causing
all the remembered state in the composition to be forgotten triggering,
for example, all disposable effects."""
Test: ./gradlew :compose:r:r:tDUT
Fixes: 220322704
Change-Id: I2c0f297104d425e2bf673debccfe7a1729761593
M compose/runtime/runtime/api/current.ignore
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/tooling/CompositionData.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composables.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composer.kt
M compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/CompositionReusingTests.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/SlotTable.kt
M compose/runtime/runtime/api/restricted_current.txt
M compose/runtime/runtime/api/current.txt
M compose/runtime/runtime/api/restricted_current.ignore
M compose/runtime/runtime/api/public_plus_experimental_current.txt
Description
We can solve it by partially disposing the composition - removing all of the remembered objects, but keeping ComposeNodes so they are still reused when we subcompose a new content after