0PricingLogin
Kotlin Multiplatform Academy · Lesson

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

  1. Use Apple Frameworks from Kotlin
  2. Memory & ARC in Kotlin/Native
  3. cinterop with C Libraries
  4. Wrap a Native SDK Cleanly
← Back to Kotlin Multiplatform Academy