Hi, I am currently doing performance benchmark of ...
# multiplatform
a
Hi, I am currently doing performance benchmark of a KMM project. Although there were no memory leaks in the Android App for one of the flows, But there are a plenty of leaks in the iOS app. After implementing one of the solutions mention in this issue (ie. calling
kotlin.native.internal.GC.collect()
when screens are getting closed) the leaks exist. I'm sharing screenshots for some of the memory leaks. Has anyone else seen these kind of leaks before?
c
I think to confirm a memory leak we would need a reproducable sample. I'm no expert, so can't infer a memory leak exists from the stack traces you provided
k
I looked at the sample app in the ticket (briefly) and there's a lot going on. I think it would be easier to isolate an individual memory leak, and also describe how you're finding these leaks. Is this using Xcode profiler? If you can't publish the code, is there at least some example of what you're doing? How you're calling the code?
I'd then be curious to also try this out with the newer memory model, as there's always been an issue with AtomicReference.
a
Yes, I have used Instruments to find the memory leaks. Apparently I can't publish the code, But I will try to find a way to reproduce it in a sample app. Also, I didn't tried this out with the new memory model.
a
I am also able to reproduce this, simple network calls are creating leaks. Kotlin: 1.7.20 Ktor: 2.1.3 Coroutines: 1.6.4 @Angad did you find any solution to this?