From 67aa039dfcf97cb774ad2a1fb80e18d222eb3150 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Sat, 9 Apr 2016 18:59:46 +0200 Subject: [PATCH] Destroy swap chain image views of swap chain is getting recreated --- base/vulkanswapchain.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/vulkanswapchain.hpp b/base/vulkanswapchain.hpp index 9f454bd2..d27bdae8 100644 --- a/base/vulkanswapchain.hpp +++ b/base/vulkanswapchain.hpp @@ -331,6 +331,10 @@ public: // This also cleans up all the presentable images if (oldSwapchain != VK_NULL_HANDLE) { + for (uint32_t i = 0; i < imageCount; i++) + { + vkDestroyImageView(device, buffers[i].view, nullptr); + } fpDestroySwapchainKHR(device, oldSwapchain, nullptr); }