mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-09-16 18:22:02 +00:00
Handle cleaning up of commandPool which caused memory leak when resizing
(cherry picked from commit ff19a49fef)
This commit is contained in:
@@ -2110,7 +2110,7 @@ static VkResult VULKAN_CreateSwapChain(SDL_Renderer *renderer, int w, int h)
|
||||
rendererData->fences = NULL;
|
||||
}
|
||||
if (rendererData->commandBuffers) {
|
||||
vkResetCommandPool(rendererData->device, rendererData->commandPool, 0);
|
||||
vkFreeCommandBuffers(rendererData->device, rendererData->commandPool, rendererData->swapchainImageCount, rendererData->commandBuffers);
|
||||
SDL_free(rendererData->commandBuffers);
|
||||
rendererData->commandBuffers = NULL;
|
||||
rendererData->currentCommandBuffer = VK_NULL_HANDLE;
|
||||
|
||||
Reference in New Issue
Block a user