func main() { p := C.CString("From Golang") defer C.free(unsafe.Pointer(p)) //have to free memory manually C.my_puts(p) }
func main() { p := C.CString("Golang is awsome") defer C.free(unsafe.Pointer(p)) C.my_puts(p) }