Memory: Remove the need for per-thread tear down.

Make key objects using the memory pool own their own pool and delete it,
such that there is not generic per-thread pool to manage.
This commit is contained in:
John Kessenich 2017-11-12 23:12:57 -07:00
parent ff8e59f510
commit cb42541e51
7 changed files with 17 additions and 130 deletions

View file

@ -56,11 +56,14 @@ class TUniformMap;
//
class TShHandleBase {
public:
TShHandleBase() { }
virtual ~TShHandleBase() { }
TShHandleBase() { pool = new glslang::TPoolAllocator; }
virtual ~TShHandleBase() { delete pool; }
virtual TCompiler* getAsCompiler() { return 0; }
virtual TLinker* getAsLinker() { return 0; }
virtual TUniformMap* getAsUniformMap() { return 0; }
virtual glslang::TPoolAllocator* getPool() const { return pool; }
private:
glslang::TPoolAllocator* pool;
};
//