https://kotlinlang.org logo
#kotlin-native
Title
# kotlin-native
р

Ролан

03/23/2021, 11:01 AM
I am a bit confused by the
memScoped
behaviour :
Copy code
val qOut = memScoped {
            val q = allocArray<IntVar>(6)
            q[0] = 56
            q
        }
println(qOut[0]) //prints 56
shouldn't have the memory behind
q
been released?
a

Artyom Degtyarev [JB]

03/23/2021, 11:39 AM
Hello @Ролан! I think this is a discussion you would like to read: https://github.com/JetBrains/kotlin-native/issues/3155
р

Ролан

03/23/2021, 12:05 PM
OK makes sense - thanks!
2 Views