Is it safe to rely on `memScoped` when working wit...
# kotlin-native
s
Is it safe to rely on
memScoped
when working with a C library to clean up and protect against memory leaks? i.e. I’ve noticed that C libraries tend to have
doSomething_new(pointer)
and
doSomething_free(pointer)
functions. if all the pointers I make are done through
alloc()
in a
memScoped
, and assuming the library itself doesn’t maintain any internal references until
free
is called, memscoped should be fine, right?