Video: https://www.droidcon.com/2024/10/17/gc-you-later-allocator/
Memory management on Android is easy: the garbage collector does almost everything and LeakCanary handles the rest! But Kotlin/Multiplatform brings new challenges. Your new features could be blocked if Kotlin/Native leaks memory.
In this talk you’ll get a refresher on Android's garbage collector, and you’ll learn how Swift works without one. Once that groundwork is laid you’ll see how Kotlin/Native integrates these two models.
We’ll cover some memory management tools & techniques:
- Using Xcode to see what’s leaking
- Avoiding leaks when mixing Kotlin and Swift
- Using PhantomReference to test memory bugs
- How Kotlin inline classes compare to Valhalla’s primitive classes.
If you’d like to improve memory management in a multiplatform app, this talk is for you.