I am writing a library in Haxe that I would like to use from C++. What do I need do to C++ side with references I get back from Haxe method calls to be sure the GC knows they are still live?
1 Like
Thanks for the link to my project!! But maybe not what this is what this person is looking for.
It’s pretty undocumented, but there are some resources. I’d recommend reading this article and the ones before it (might be out of date??): hxcpp-guide/work-in-progress/build/5.1-building-a-wrapped-dynamic-library.md at master · snowkit/hxcpp-guide · GitHub
I’d also recommend studying HxGodot, which generates a C++ binary that can have its functions called arbitrarily, but might have to dig through it.