If I return from inside a memScoped lambda, does t...
# kotlin-native
l
If I return from inside a memScoped lambda, does that leak anything I’ve allocated? I would assume that return@memScoped would work fine, but I’m not sure about returning from the function.
t
it uses
finally
so how you return should not matter
l
Thanks. I assumed there would be something in place, but it's good to know for sure that I'm not leaking memory by returning early from the lambda.
t
the docs have a source link that can helpful in a case like this
👍 1