From ff8e59f5105bc04d5e26fd5766efc30c8f1ce6ff Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Sun, 12 Nov 2017 15:55:22 -0700 Subject: [PATCH] Memory: Do process and 1st thread tear down. Addresses #928, #389, and 1st item in #976. Overlaps #916. This had been dropped, when moving away from the old Win32 DLL model. Issue: per-thread tear down for other threads. --- OGLCompilersDLL/InitializeDll.cpp | 2 -- glslang/MachineIndependent/ShaderLang.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/OGLCompilersDLL/InitializeDll.cpp b/OGLCompilersDLL/InitializeDll.cpp index c1f03c09..67bf15f9 100644 --- a/OGLCompilersDLL/InitializeDll.cpp +++ b/OGLCompilersDLL/InitializeDll.cpp @@ -148,8 +148,6 @@ bool DetachProcess() if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) return true; - ShFinalize(); - success = DetachThread(); FreePoolIndex(); diff --git a/glslang/MachineIndependent/ShaderLang.cpp b/glslang/MachineIndependent/ShaderLang.cpp index d1dec88b..43a94b79 100644 --- a/glslang/MachineIndependent/ShaderLang.cpp +++ b/glslang/MachineIndependent/ShaderLang.cpp @@ -1299,7 +1299,7 @@ int __fastcall ShFinalize() glslang::HlslScanContext::deleteKeywordMap(); #endif - return 1; + return DetachProcess() ? 1 : 0; } //