https://golang.org/cmd/cgo/ says:
// The C string is allocated in the C heap using malloc.
// It is the caller's responsibility to arrange for it to be
// freed, such as by calling C.free (be sure to include stdlib.h
// if C.free is needed).
What if I use C.CString
inline as parameter? I would have to free()
it anyways, right? What is best practise in this case?
Example:
ret := C.RandomCFunction(C.CString("foo"))