Hi all! I’m facing a massive issue on iOS about me...
# kotlin-native
e
Hi all! I’m facing a massive issue on iOS about memory leaks around coroutines (first screenshot) and the second kind (second screenshot) looks like is more related to ktor. Unfortunately it’s not clear which is the source of the issue via the memory leak inspector. As you can see from the third screenshot, the network call is just a normal suspend function called via scope.launch (screenshot #4) Have you ever experienced anything like this? Thanks in advance!
👀 4
💧 2
kotlin version is 1.4.10 coroutines is 1.4.2-native-mt
a
Not sure about this particular leak, but in general this kinda expected for native coroutines. https://kotlinlang.org/docs/mobile/concurrency-and-coroutines.html#multithreaded-coroutines As per doc:
Using multithreaded coroutines may result in memory leaks. This can be a problem for complex coroutine scenarios under load. We are working on a solution for this.
👍 1
e
Thanks @Arkadii Ivanov, I think that’s the source of the issue too.
So my question here is more if other devs are following the same approach waiting for a fix or implement coroutines in another way
In the meanwhile upgrading • ktor_version to 1.5.0 • serialization version to 1.0.1 • kotlin version to 1.4.30-M1 Decreased the leaks of around 80%
🎉 2