(MemoryPool) Added methods to construct/destruct object
Former-commit-id: cd58a108ff201be6e242701eb762e0151695f6e3
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user