Hi @ivanpribec, regarding your second question, have you checked that cpp_object is still valid after foo1? I only ask because you mention returning a pointer to cpp_object from foo1 but I had thought you required double-pointers (pointer-to-pointer) to do such a thing in c? Apologies if I have the wrong idea, it’s been a while since I l’ve subjected myself to c pointers
.
Regarding your first question, your explanation agrees with my own understanding for the process.