diff options
| author | Yong He <yonghe@outlook.com> | 2018-02-20 23:55:51 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-20 23:55:51 -0500 |
| commit | 01c4134d33cea3a4f98fad9248584278fd4bc452 (patch) | |
| tree | 8ca6b0f7e844fbf56cb1991284aff3ebbcc8aa89 /source/slang/memory_pool.h | |
| parent | 51cdcad24b5271ac8c0f816174c6a760e264ed9e (diff) | |
| parent | 4cf46e5c8b2af8a4ea4db15cd402aae4145a614c (diff) | |
Merge pull request #417 from csyonghe/leakfix
Fix IR memory leaks.
Diffstat (limited to 'source/slang/memory_pool.h')
| -rw-r--r-- | source/slang/memory_pool.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/slang/memory_pool.h b/source/slang/memory_pool.h new file mode 100644 index 000000000..ee3ee1aa3 --- /dev/null +++ b/source/slang/memory_pool.h @@ -0,0 +1,19 @@ +#ifndef SLANG_MEMORY_POOL_H +#define SLANG_MEMORY_POOL_H + +#include "../core/basic.h" + +namespace Slang +{ + struct MemoryPoolSegment; + + struct MemoryPool : public RefObject + { + MemoryPoolSegment* curSegment = nullptr; + ~MemoryPool(); + void* alloc(size_t size); + void* allocZero(size_t size); + }; +} + +#endif
\ No newline at end of file |
