When I commented out the call to DestroyDebugUtilsMessengerEXT in cleanup(), no errors. However when I added vkDestroyInstance to cleanup() just after 'if (enableValidationLayers){}', I got the validation-layer errors as advertised, followed by "Unloading layer library."
vkDestroyInstance(instance, nullptr);
Linux, kernel 5.4.85, mesa-20.3.1-x86_64, vulkan-sdk-1.2.162 from LunarG.
When I commented out the call to DestroyDebugUtilsMessengerEXT in cleanup(), no errors. However when I added vkDestroyInstance to cleanup() just after 'if (enableValidationLayers){}', I got the validation-layer errors as advertised, followed by "Unloading layer library."
vkDestroyInstance(instance, nullptr);
Linux, kernel 5.4.85, mesa-20.3.1-x86_64, vulkan-sdk-1.2.162 from LunarG.