# Apollo Kotlin: New Multiplatform Memory Manager

DevFeed: [Apollo Kotlin: New Multiplatform Memory Manager](<https://devfeed.tech/articles/apollo-kotlin-new-multiplatform-memory-manager-23202.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/apollo-kotlin-new-multiplatform-memory-manager>)

Author: Benoit Lubek

Published: 2022-08-09T12:05:22Z

Content type: news

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [kotlin-multiplatform-libraries](<https://devfeed.tech/topics/kotlin-multiplatform-libraries.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [apollo](<https://devfeed.tech/tags/apollo.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [immutability](<https://devfeed.tech/tags/immutability.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [kotlin-native](<https://devfeed.tech/tags/kotlin-native.md>), [library](<https://devfeed.tech/tags/library.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [performance](<https://devfeed.tech/tags/performance.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

## AI overview

Apollo Kotlin 3.5.0 adopts Kotlin Native's new memory manager. The change removes several threading and immutability restrictions, including the requirement to access the library exclusively from the Main thread on Apple targets. Initial benchmarks indicate performance improvements of up to 45%.

## Source excerpt

Back in May, we shared about how Apollo Kotlin started supporting the Hierarchical project structure. Following the Kotlin Multiplatform ecosystem, here is some more news, this time about the new Memory Manager. Kotlin Native's Memory Manager Since its early days, Kotlin Native has had specific rules regarding multithreading and immutability: - objects could only be accessed from the thread they were created in - unless they had been "frozen", in which case they could be accessed by multiple...