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
Menu