When we don't need an image view any more, we should destroy it.
Destroying an image view
How to do it...
- Take the handle of a logical device and store it in a variable of type VkDevice named logical_device.
- Take the handle of an image view stored in a variable of type VkImageView named image_view.
- Call vkDestroyImageView( logical_device, image_view, nullptr ) and provide the handle of the logical device, the handle of the image view, and a nullptr value.
- For safety reasons, assign a VK_NULL_HANDLE value to the image_view variable.
How it works...
Destroying an image view requires us to use its handle and the...