func (osType *GuestOsType) Release() error {
  if osType.ctype != nil {
    result := C.GoVboxIGuestOSTypeRelease(osType.ctype)
    if C.GoVboxFAILED(result) != 0 {
      return errors.New(
          fmt.Sprintf("Failed to release IGuestOSType: %x", result))
    }
    osType.ctype = nil
  }
  return nil
}
Release frees up the associated VirtualBox data.
After the call, this instance is invalid, and using it will cause errors.
It returns any error encountered.
package vbox
import "C"   
import (
  "errors"
  "fmt"
  "reflect"
  "unsafe"
)
type GuestOsType struct {
  ctype *C.IGuestOSType
}
func (osType *GuestOsType) GetId() (string, error) {
  var cid *C.char
  result := C.GoVboxGetGuestOSTypeId(osType.ctype, &cid)
  if C.GoVboxFAILED(result) != 0 || cid == nil {
    return "", errors.New(
        fmt.Sprintf("Failed to get IGuestOSType id: %x", result))
  }
  id := C.GoString(cid)
  C.GoVboxUtf8Free(cid)
  return id, nil
}