Cooperation of Kotlin/Native GC and ARC on iOS
summary
Kotlin Multiplatform use on iOS mixes Swift’s ARC with Kotlin/Native’s garbage collector, so objects can move between ARC-managed and K/N GC–managed memory. The talk explains how Kotlin/Native GC integrates with ARC to make this interaction mostly seamless and describes specific edge cases where the two memory-management systems can conflict.
AI-written summary · about
chapters (27)
- 0:00Introduction
- 2:57Speaker background
- 4:24Memory management basics
- 10:48Swift and Kotlin object lifecycle
- 11:30Memory experiment setup
- 12:13Experiment 1: object destruction without retain
- 12:34Experiment 2: Kotlin GC impact on objects
- 13:15Experiment 3: manual GC trigger
- 14:00Experiment 4: object retention in memory
- 14:21Experiment 5: Kotlin GC async call
- 14:43Intermediate findings and tips
- 15:46Passing Swift objects to Kotlin
- 16:48Memory Graph analysis
- 17:32Object lifetime management
- 18:36Autorelease pool issues
- 19:38Thread impact on Kotlin GC
- 20:49Handling strong reference cycles
- 21:32RC vs GC object ownership
- 23:15Ownership check implementation
- 25:46Mixing Kotlin and Objective-C
- 27:54Usage tricks recommendations
- 28:37Android memory limits
- 29:38iOS memory limits
- 31:26Low memory notifications
- 33:13Talk summary
- 34:18Bonus materials
- 35:20Q&A
related talks
33mAdvanced Kotlin Native Integration
52mKEYNOTE: Kotlin/Native – Embracing existing ecosystems
26mKotlin/Native for Multiplatform Development
43mThe Triumphs and Tribulations of Kotlin-Native in Practice
39mDependencies and Kotlin/Native
30mReusable Cross-Platform Frameworks with Kotlin/Native
18mKotlin native
31mKotlin/Native for Multiplatform Development
