Tech
iOS Keeps Observing a Dead Kotlin Flow — the CommonFlow Leak Hiding in Your KMP Bridge
iOS Keeps Observing a Dead Kotlin Flow — the CommonFlow Leak Hiding in Your KMP Bridge
So you've wrapped your shared Flow<T> for Swift consumption. Something like this on the Kotlin side:
class CommonFlow < T : Any >( private val wrapped : Flow < T >) {
fun watch ( block : ( T ) -> Unit ): CommonFlowCancellation {
val job = Job ()
wrapped . onEach {
block ( it )
...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to