Memory & ARC in Kotlin/Native
Reason about ownership across the boundary.
Two Worlds of Memory
On iOS your Kotlin objects and Apple objects coexist. Kotlin/Native uses its own collector, while Apple uses ARC reference counting under the hood.
What ARC Does
ARC, Automatic Reference Counting, frees an Objective-C object once nothing references it. It is automatic, but it still tracks ownership precisely. 🧮
All lessons in this course
- Use Apple Frameworks from Kotlin
- Memory & ARC in Kotlin/Native
- cinterop with C Libraries
- Wrap a Native SDK Cleanly