Permalink
Browse files

Vulkan vertex cache: Fix memory leak

  • Loading branch information...
hrydgard committed Nov 24, 2017
1 parent cc3ba1b commit 0646dc749bf21554b030d04ab9e3459308f92cbb
Showing with 5 additions and 1 deletion.
  1. +5 −1 GPU/Vulkan/DrawEngineVulkan.cpp
@@ -250,7 +250,11 @@ void DrawEngineVulkan::DestroyDeviceObjects() {
vertexCache_->Destroy(vulkan_);
delete vertexCache_;
vertexCache_ = nullptr;
vai_.Clear(); // Need to clear this to get rid of all remaining references to the dead buffers.
// Need to clear this to get rid of all remaining references to the dead buffers.
vai_.Iterate([](uint32_t hash, VertexArrayInfoVulkan *vai) {
delete vai;
});
vai_.Clear();
}
void DrawEngineVulkan::DeviceLost() {

0 comments on commit 0646dc7

Please sign in to comment.