From b891c2b8272859f32bf92ca30fca5841139c78a8 Mon Sep 17 00:00:00 2001 From: Andrew Woloszyn Date: Mon, 18 Jan 2016 09:26:25 -0500 Subject: [PATCH] Freed up some memory when no longer needed in glslangValidator. --- StandAlone/StandAlone.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp index 92010840..f47410b8 100644 --- a/StandAlone/StandAlone.cpp +++ b/StandAlone/StandAlone.cpp @@ -435,6 +435,8 @@ void ProcessConfigFile() } if (configStrings) FreeFileData(configStrings); + else + delete[] config; } // thread-safe list of shaders to asynchronously grab and compile @@ -805,6 +807,11 @@ int C_DECL main(int argc, char* argv[]) glslang::InitializeProcess(); CompileAndLinkShaders(); glslang::FinalizeProcess(); + for (int w = 0; w < NumWorkItems; ++w) { + if (Work[w]) { + delete Work[w]; + } + } } else { ShInitialize(); @@ -837,6 +844,8 @@ int C_DECL main(int argc, char* argv[]) ShFinalize(); } + delete[] Work; + if (CompileFailed) return EFailCompile; if (LinkFailed)