Merge pull request #133 from AWoloszyn/spirv-memory

Free memory associated with SPIR-V generation and the pragmaTable.
This commit is contained in:
John Kessenich 2016-01-18 10:48:07 -07:00
commit 3e9add360d
5 changed files with 109 additions and 93 deletions

View file

@ -847,7 +847,9 @@ class TIntermAggregate : public TIntermOperator {
public:
TIntermAggregate() : TIntermOperator(EOpNull), userDefined(false), pragmaTable(0) { }
TIntermAggregate(TOperator o) : TIntermOperator(o), pragmaTable(0) { }
~TIntermAggregate() { delete pragmaTable; }
// Since pragmaTable is allocated with the PoolAllocator, we
// only want to destroy it, not free the associated memory.
~TIntermAggregate() { pragmaTable->~TPragmaTable(); }
virtual TIntermAggregate* getAsAggregate() { return this; }
virtual const TIntermAggregate* getAsAggregate() const { return this; }
virtual void setOperator(TOperator o) { op = o; }