April 2017
Intermediate to advanced
700 pages
21h 36m
English
Destroying an image view requires us to use its handle and the handle of the logical device on which the image view was created. It is performed in the following way:
if( VK_NULL_HANDLE != image_view ) {
vkDestroyImageView( logical_device, image_view, nullptr );
image_view = VK_NULL_HANDLE;
}
First, we check whether the handle is not empty. We don't need to do it--destroying a null handle is silently ignored. But it's good to skip unnecessary function calls. Next, we destroy the image view and assign a null handle to the variable in which the handle was stored.
Read now
Unlock full access