De-allocate memory in ShFinalize(). There still seems to be a bug here if the translator is used in a multi-threaded environment. It seems memory local to only one thread is being deallocated - the thread from which ShFinalize() is called. I will look into it closely in the next CL.
Review URL: http://codereview.appspot.com/1878044
git-svn-id: https://angleproject.googlecode.com/svn/trunk@353 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/ShaderLang.cpp b/src/compiler/ShaderLang.cpp
index 3c36ef8..865be18 100644
--- a/src/compiler/ShaderLang.cpp
+++ b/src/compiler/ShaderLang.cpp
@@ -90,9 +90,10 @@
//
int ShInitialize()
{
- bool ret = InitProcess();
+ if (!InitProcess())
+ return 0;
- return ret ? 1 : 0;
+ return 1;
}
//
@@ -134,6 +135,9 @@
//
int ShFinalize()
{
+ if (!DetachProcess())
+ return 0;
+
return 1;
}