summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-02-28 15:13:07 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-02-28 15:13:07 +0000
commit3f69e88e20ebabc9b4ee363106e7646cbff7d754 (patch)
treef4a31a0f20818a04c4e3b84e45625691b3559aab /Graphics/GraphicsEngineVulkan
parentFixed some issues in Vk backend (diff)
downloadDiligentCore-3f69e88e20ebabc9b4ee363106e7646cbff7d754.tar.gz
DiligentCore-3f69e88e20ebabc9b4ee363106e7646cbff7d754.zip
Fixed memory leak
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp6
1 files changed, 5 insertions, 1 deletions
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();