Kotlin Multiplatform: Memory management old and new way with Anna Zharkova

Опубликовано: 01 Октябрь 2024
на канале: Android Worldwide
1,366
33

The main idea of Kotlin Multiplatform, as well as other cross-platform SDKs, is to optimize development by writing code once and share it between different platforms. However, dealing with a common code base could have some nuances that should be figured out and solved according to the platform specifics. And implementation in a common base could be really tricky. One such moment is dealing with memory management, multithreading and concurrency. KMM SDK uses the specific for every native platform version of Kotlin: Kotlin/JVM, Kotlin/JS, or Kotlin/Native. Every version includes special Kotlin language extensions, tools, and libraries specified for a particular platform.

I would like to examine the specifics of both platforms, to show the difference between Kotlin Native and Kotline JVM, what problems could be faced in providing a common solution for both platforms, and the ways to provide a working solution. And how to work with new memory management model in 1.6.0 version of Kotlin/Native