зеркало из https://github.com/stride3d/xkslang.git
Fixup leak of TString
In decomposeIntrinsic a new TString was being allocated and passed into a TVariable. That string was leaking. This CL converts the new TString to call NewPoolTString to allocate from the TString pool.
This commit is contained in:
Родитель
58d6905ea0
Коммит
0560138e66
|
@ -4607,7 +4607,7 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*&
|
|||
if (nullptr == symbol) {
|
||||
type.getQualifier().builtIn = builtin;
|
||||
|
||||
TVariable* variable = new TVariable(new TString(name), type);
|
||||
TVariable* variable = new TVariable(NewPoolTString(name), type);
|
||||
|
||||
symbolTable.insert(*variable);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче