FreeHost frees memory in host buffer representation of image Only if we own the host buffer.
()
| 724 | // FreeHost frees memory in host buffer representation of image |
| 725 | // Only if we own the host buffer. |
| 726 | func (im *Image) FreeHost() { |
| 727 | if im.Host.Size == 0 || !im.IsHostOwner() { |
| 728 | return |
| 729 | } |
| 730 | im.SetFlag(false, ImageOwnsHost) |
| 731 | vk.UnmapMemory(im.Dev, im.Host.Mem) |
| 732 | FreeBuffMem(im.Dev, &im.Host.Mem) |
| 733 | DestroyBuffer(im.Dev, &im.Host.Buff) |
| 734 | im.Host.SetNil() |
| 735 | } |
| 736 | |
| 737 | // Destroy destroys any existing view, nils fields |
| 738 | func (im *Image) Destroy() { |
no test coverage detected