When we don't need a descriptor pool any more, we can destroy it (with all descriptor sets allocated from the pool).
Destroying a descriptor pool
How to do it...
- Take the handle of a created logical device and store it in a variable of type VkDevice named logical_device.
- Provide the handle of the descriptor pool through a variable of type VkDescriptorPool named descriptor_pool.
- Call vkDestroyDescriptorPool( logical_device, descriptor_pool, nullptr ) and provide the logical_device and descriptor_pool variables and a nullptr value.
- For safety, assign the VK_NULL_HANDLE value to the descriptor_pool variable.