From 3f69e88e20ebabc9b4ee363106e7646cbff7d754 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Thu, 28 Feb 2019 07:13:07 -0800 Subject: Fixed memory leak --- Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp index 443076df..ec5ff6b3 100644 --- a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp @@ -453,9 +453,13 @@ PipelineStateVkImpl::~PipelineStateVkImpl() } auto& RawAllocator = GetRawAllocator(); - for (Uint32 s=0; s < m_NumShaders; ++s) + for (Uint32 s=0; s < m_NumShaders*2; ++s) { m_ShaderResourceLayouts[s].~ShaderResourceLayoutVk(); + } + + for (Uint32 s=0; s < m_NumShaders; ++s) + { m_StaticResCaches[s].~ShaderResourceCacheVk(); m_StaticVarsMgrs[s].Destroy(GetRawAllocator()); m_StaticVarsMgrs[s].~ShaderVariableManagerVk(); -- cgit v1.2.3