Wouldn’t memory leak if Context is provided as CompositionLocal like LocalContext(activity context by owner.context)? CompositionLocal values store in SlotTable, I know that SlotTable is just a linear array. In the case of an activity context, entering the array is a potential memory leak. Let me know if I’m misunderstood.
👍 3
a
Albert Chang
05/21/2022, 1:11 PM
When the activity is destroyed, the composition tied to the
ComposeView
in the activity, which includes the slot table, will be disposed.