Fix some issues with freeing resources
This commit is contained in:
@@ -46,6 +46,7 @@ namespace OpenVulkano
|
||||
{
|
||||
device.freeCommandBuffers(cmdPool, 1, &cmdBuffer);
|
||||
device.destroyCommandPool(cmdPool);
|
||||
cmdPool = nullptr;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace OpenVulkano::Vulkan
|
||||
|
||||
swapChainRenderPass.Close();
|
||||
swapChain.Close();
|
||||
device = nullptr;
|
||||
deviceManager.Close();
|
||||
vkDestroySurfaceKHR(static_cast<VkInstance>(instance), surface, nullptr);
|
||||
//TODO
|
||||
|
||||
@@ -81,6 +81,7 @@ namespace OpenVulkano::Vulkan
|
||||
}
|
||||
uiRenderer.Close();
|
||||
resourceManager.Close();
|
||||
commands.clear();
|
||||
context.Close();
|
||||
scene = nullptr;
|
||||
}
|
||||
|
||||
@@ -114,6 +114,7 @@ namespace OpenVulkano::Vulkan
|
||||
}
|
||||
descriptorSetLayoutCache.clear();
|
||||
shaders.clear();
|
||||
frameResources = {};
|
||||
memPool.Close();
|
||||
device = nullptr;
|
||||
}
|
||||
|
||||
@@ -85,6 +85,7 @@ namespace OpenVulkano::Vulkan
|
||||
#endif
|
||||
ImGui_ImplVulkan_Shutdown();
|
||||
device.destroy(descriptorPool);
|
||||
uiRenderPass.Close();
|
||||
}
|
||||
|
||||
void UiRenderer::BeginUiFrame() const
|
||||
|
||||
Reference in New Issue
Block a user