Vulkan vertex cache: Fix memory leak

This commit is contained in:
Henrik Rydgård committed 2017-11-24 13:53:23 +01:00
1 parent cc3ba1bbf7
commit 0646dc749b
1 file changed
+5 -1
+5 -1
View File
@@ -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() {