Is there a "global" equivalent of memScoped?
# kotlin-native
n
Is there a "global" equivalent of memScoped?
s
What do you mean?
memScoped
is used to clean up memory that is manually allocated once it's done being used. A "global" equivalent wouldn't be able to do that
n
Have a String variable which has been moved from a function to a Object, which needs to be accessible beyond the lifetime of a C function call.
s
Maybe try converting it to a
KString
?
n
Got the String variable mixed up with the repo (a val of type CPointer<GIRepository>). The GIR library is indicating that repo is null even though it isn't (via a warning message).
Turns out that GObject namespaces are case sensitive, oops 😆. Fixed the use of case in the String and the message has disappeared.