func (d *VirDomain) Free() error { result := C.virDomainFree(d.ptr) if result == -1 { return errors.New(GetLastError()) } return nil }
// Free frees the domain object. The running instance is kept alive. The data // structure is freed and should not be used thereafter. func (dom Domain) Free() error { dom.log.Println("freeing domain object...") cRet := C.virDomainFree(dom.virDomain) ret := int32(cRet) if ret == -1 { err := LastError() dom.log.Printf("an error occurred: %v\n", err) return err } dom.log.Println("domain freed") return nil }
func cleanupDomain(domain *Domain) { if domain.cptr != nil { C.virDomainFree(domain.cptr) } }
func (d *VirDomain) Free() error { if result := C.virDomainFree(d.ptr); result != 0 { return GetLastError() } return nil }