I\'m using a C++ library from Go via SWIG. SWIG does not take care of memory management, so the Go side looks something like this: