Is it safe for me to allocate in `ComposeNode(fact...
# compose
d
Is it safe for me to allocate in
ComposeNode(factory = { /* IN HERE!! */ }, ...)
and deallocate in
Applier<*>.remove(...) { /* IN HERE!!! */ }
? What do I have to worry about between the node being created and the node being inserted into the applier?
l
Applier doesn't know what
ComposeNode
it controls at the time, so it may result in not matching to the correct
ComposeNode
. Try
DisposableEffect
next to
ComposeNode
instead to deallocate.
d
Unfortunately DisposableEffect releases the node too soon. I need the node to be released when remove is called.
Or more specifically
onEndChanges