Browse Source

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.
John Kessenich 7 năm trước cách đây
mục cha
commit
ff8e59f510

+ 0 - 2
OGLCompilersDLL/InitializeDll.cpp

@@ -148,8 +148,6 @@ bool DetachProcess()
     if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX)
     if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX)
         return true;
         return true;
 
 
-    ShFinalize();
-
     success = DetachThread();
     success = DetachThread();
 
 
     FreePoolIndex();
     FreePoolIndex();

+ 1 - 1
glslang/MachineIndependent/ShaderLang.cpp

@@ -1299,7 +1299,7 @@ int __fastcall ShFinalize()
     glslang::HlslScanContext::deleteKeywordMap();
     glslang::HlslScanContext::deleteKeywordMap();
 #endif
 #endif
 
 
-    return 1;
+    return DetachProcess() ? 1 : 0;
 }
 }
 
 
 //
 //