Who manages the memory after converting char* to [] byte in cgo?

package main

// -sharpinclude <stdio.h>
// -sharpinclude <stdlib.h>
// -sharpinclude <string.h>
// -sharpinclude <stdint.h>
// void get(uint8_t** u, uint32_t* n) {
//   *u = (uint8_t*)malloc(sizeof(uint8_t) * 10);
//   *n = 10;
//   memcpy(*u, "hehehe", 10);
//   printf("%p\n", *u);
// }
import "C"

import (
  // "fmt"
  "unsafe"
)

func main() {
  var cstr *C.uint8_t
  var clen C.uint32_t
  C.get(&cstr, &clen)

  resBuf := (*[1 << 30]byte)(unsafe.Pointer(cstr))[:int(clen):int(clen)]
  cstr2 := (*C.uint8_t)(unsafe.Pointer(&resBuf[0]))
  println(cstr2)
}

who manages the memory of the resBuf converted from cstr? Manual management or the gc mechanism of the go language itself? Solve it!

Go
Jun.23,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e7a94f-7ea.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e7a94f-7ea.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?