Does kotlin native have a garbage collector?
# kotlin-native
s
Does kotlin native have a garbage collector?
stackoverflow 1
we also have the ability to manage the memory manually, if we really value the performance of a part of code? That's kind of what
memScoped
is?
o
spierce7:
memScoped
is mostly to manage memory passed to C libraries, where instead of automated MM user is sure that by contract of an API memory is not needed after leaving certain block
Partially, because
memScoped
manages raw memory, not object memory
s
So we don't have the option of manually managing memory for performance, or is that something we shouldn't be thinking about?
o
Well, for cases where large data comes in form of raw data (audio, videos, images) we can use manual memory mgmt for that data. For objects it is smth to think about.
b
fwiw, i think the current setup is amazing, and manually managing objects isn't really necessary
the only thing that'd be great is stack allocation for short lived local objects with scape analysis
👍 1
*escape
if you add MM for objects, i think code sharing between JVM Kotlin and Kotlin Native may suffer