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:
parent
ff8e59f510
commit
cb42541e51
7 changed files with 17 additions and 130 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue