https://kotlinlang.org logo
#compose-ios
Title
# compose-ios
t

tylerwilson

03/29/2024, 6:44 PM
Good day. I am trying to track down excessive memory usage for our iOS app that uses CMP. Every time I enter a new view a large allocation occurs, but never appears to be freed. See thread for details.
Here are examples of the allocations, and the memory graph over the same time. I use the CMP views as child view controllers, and did add the requisite removal process on viewDidDisappear, but I do not see any of these allocations coming back. Anybody see this, and perhaps have a solution? Thank you!
m

Max

03/30/2024, 8:00 AM
Could you send a list of 3rd party libraries you use? Might help
t

tylerwilson

04/02/2024, 12:24 PM
commonMain
SPM:
I did some issues in my code on the iOS side: I often use callbacks between the ComposeUIViewController and the Swift/iOS code. And I was missing the [weak self] which may have caused those objects to be held on to too long. I fixed those up and things appear better. But I need to do further testing to make sure.
👍 1
4 Views