Fixes leaks in ResourceCache, Vulkan and X11

This commit is contained in:
qarmin
2020-04-15 10:27:57 +02:00
parent 84142f6a5f
commit 943ec79859
4 changed files with 21 additions and 1 deletions

View File

@@ -1503,6 +1503,15 @@ VulkanContext::~VulkanContext() {
if (queue_props) {
free(queue_props);
}
for (uint32_t i = 0; i < FRAME_LAG; i++) {
vkDestroyFence(device, fences[i], nullptr);
vkDestroySemaphore(device, image_acquired_semaphores[i], nullptr);
vkDestroySemaphore(device, draw_complete_semaphores[i], nullptr);
if (separate_present_queue) {
vkDestroySemaphore(device, image_ownership_semaphores[i], nullptr);
}
}
DestroyDebugUtilsMessengerEXT(inst, dbg_messenger, nullptr);
vkDestroyDevice(device, nullptr);
vkDestroyInstance(inst, nullptr);
}