title: How Kotlin/Native garbage collector works in C?
body: <p>I'm found some explanation of Kotlin/Native memory management model in <a href="https://github.com/JetBrains/kotlin-native/blob/master/FAQ.md" rel="noreferrer">JetBrains FAQ</a>. </p>
  
  <blockquote>
    <p>A: Kotlin/Native provides an automated memory management scheme,
    similar to what Java or Swift provides. The current implementation
    includes an automated reference counter with a cycle collector to
    collect cyclical garbage.</p>
  </blockquote>
  
  <p>I understand more or less how it works in Java or Kotlin (JVM). Can any describe detailed how memory is managed in Kotlin/Native in projects with C? </p>
  
  <p>Also, if there is the garbage collector, why do we need a Kotlin/Native function memScoped { }? </p>
  
  <p>Also, I found <a href="https://medium.com/androidiots/the-magic-of-kotlin-native-part-1-fad2795632b1" rel="noreferrer">here</a> : </p>
  
  <blockquote>
    <p>Kotlin/Native is a technology for compiling Kotlin to native binaries that run without any VM.
    Broadly speaking, Native code is any code whose memory is not managed by the underlying framework but has to be managed by the programmer themselves. i.e. there is no Garbage collection.
    e.g. C++’ delete and C’s free</p>
  </blockquote>
  
  <p>which in my opinion contradicts what is written in JetBrains FAQ</p>