Images that won't be used any more should be destroyed to release their resources.
Destroying an image
How to do it...
- Take a logical device and store its handle in a variable of type VkDevice named logical_device.
- Use the image's handle to initialize a variable of type VkImage named image.
- Call vkDestroyImage( logical_device, image, nullptr ). Provide the handle of the logical device, the handle of the image, and a nullptr value.
- For safety reasons, assign a VK_NULL_HANDLE value to the image variable.
How it works...
Images are destroyed through a single call of the vkDestroyImage() function. For it,...