Merge pull request #46760 from qarmin/fix_memory_leak_vulkan

Fix memory leak in VulkanContext
This commit is contained in:
Rémi Verschelde 2021-03-07 16:40:32 +01:00 committed by GitHub
commit daab4c9ac4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1705,7 +1705,7 @@ VulkanContext::~VulkanContext() {
vkDestroySemaphore(device, image_ownership_semaphores[i], nullptr); vkDestroySemaphore(device, image_ownership_semaphores[i], nullptr);
} }
} }
if (inst_initialized && use_validation_layers) { if (inst_initialized && enabled_debug_utils) {
DestroyDebugUtilsMessengerEXT(inst, dbg_messenger, nullptr); DestroyDebugUtilsMessengerEXT(inst, dbg_messenger, nullptr);
} }
vkDestroyDevice(device, nullptr); vkDestroyDevice(device, nullptr);