Fixed memory leak associated with TLS.
We used to allocate thread-local memory on each compile.
If the compile did not happen on the same thread as ShInitialize,
we leaked the thread-local memory.
It turns out that there is no need to allocate any thread-local
memory. This patch cleans up all the unnecessary junk around TLS.
BUG=crbug.com/181691
R=kbr@chromium.org
Review URL: https://codereview.appspot.com/11679046
Conflicts:
src/compiler/ConstantUnion.h
src/compiler/ShaderLang.cpp
src/compiler/Types.h
src/compiler/ValidateLimitations.cpp
diff --git a/src/compiler/intermediate.h b/src/compiler/intermediate.h
index 17571bd..efc3a6e 100644
--- a/src/compiler/intermediate.h
+++ b/src/compiler/intermediate.h
@@ -216,8 +216,7 @@
//
class TIntermNode {
public:
- POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)
-
+ POOL_ALLOCATOR_NEW_DELETE();
TIntermNode() {
// TODO: Move this to TSourceLoc constructor
// after getting rid of TPublicType.
@@ -555,8 +554,7 @@
class TIntermTraverser
{
public:
- POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)
-
+ POOL_ALLOCATOR_NEW_DELETE();
TIntermTraverser(bool preVisit = true, bool inVisit = false, bool postVisit = false, bool rightToLeft = false) :
preVisit(preVisit),
inVisit(inVisit),