(MemoryPool) Added methods to construct/destruct object

Former-commit-id: cd58a108ff201be6e242701eb762e0151695f6e3
This commit is contained in:
Lynix
2015-03-01 00:02:41 +01:00
parent 655be2864f
commit e55574cb8b
2 changed files with 24 additions and 10 deletions

View File

@@ -19,15 +19,16 @@ class NzMemoryPool
NzMemoryPool(NzMemoryPool&& pool) noexcept;
~NzMemoryPool() = default;
template<typename T> T* Allocate();
void* Allocate(unsigned int size);
template<typename T> void Delete(T* ptr);
void Free(void* ptr);
unsigned int GetBlockSize() const;
unsigned int GetFreeBlocks() const;
unsigned int GetSize() const;
template<typename T, typename... Args> T* New(Args&&... args);
NzMemoryPool& operator=(const NzMemoryPool&) = delete;
NzMemoryPool& operator=(NzMemoryPool&& pool) noexcept;