Commit f75276ba by John Kessenich

glslang tear down: Include deleting the keyword map in tear down. From johnk…

glslang tear down: Include deleting the keyword map in tear down. From johnk and sawato shusaku (shusaku.sawato@dmprof.com). git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31115 e7fa87d3-cd2b-0410-9028-fcbf551c1848
parent 6add20a8
...@@ -113,7 +113,7 @@ bool DetachThread() ...@@ -113,7 +113,7 @@ bool DetachThread()
return true; return true;
// //
// Function is re-entrant and this thread may not have been initalised. // Function is re-entrant and this thread may not have been initialized.
// //
if (OS_GetTLSValue(ThreadInitializeIndex) != 0) { if (OS_GetTLSValue(ThreadInitializeIndex) != 0) {
if (!OS_SetTLSValue(ThreadInitializeIndex, (void *)0)) { if (!OS_SetTLSValue(ThreadInitializeIndex, (void *)0)) {
......
...@@ -514,6 +514,14 @@ void TScanContext::fillInKeywordMap() ...@@ -514,6 +514,14 @@ void TScanContext::fillInKeywordMap()
ReservedSet->insert("using"); ReservedSet->insert("using");
} }
void TScanContext::deleteKeywordMap()
{
delete KeywordMap;
KeywordMap = 0;
delete ReservedSet;
ReservedSet = 0;
}
int TScanContext::tokenize(TPpContext* pp, TParserToken& token) int TScanContext::tokenize(TPpContext* pp, TParserToken& token)
{ {
do { do {
......
...@@ -52,6 +52,8 @@ public: ...@@ -52,6 +52,8 @@ public:
virtual ~TScanContext() { } virtual ~TScanContext() { }
static void fillInKeywordMap(); static void fillInKeywordMap();
static void deleteKeywordMap();
int tokenize(TPpContext*, TParserToken&); int tokenize(TPpContext*, TParserToken&);
protected: protected:
......
...@@ -668,6 +668,8 @@ int __fastcall ShFinalize() ...@@ -668,6 +668,8 @@ int __fastcall ShFinalize()
PerProcessGPA = 0; PerProcessGPA = 0;
} }
glslang::TScanContext::deleteKeywordMap();
return 1; return 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment