Descriptor set layouts that are no longer used should be destroyed.
Destroying a descriptor set layout
How to do it...
- Provide a logical device's handle using a variable of type VkDevice named logical_device.
- Take the handle of a created descriptor set layout and use it to initialize a variable of type VkDescriptorSetLayout named descriptor_set_layout.
- Call vkDestroyDescriptorSetLayout( logical_device, descriptor_set_layout, nullptr ) and provide handles of the logical device and descriptor set layout, and a nullptr value.
- For safety, assign the VK_NULL_HANDLE value to the descriptor_set_layout variable.