MemoryPoolAllocator: prohibit copying and assignment
The MemoryPoolAllocator implementation cannot and should not be copied (Rule of Three). Declare copy constructor and copy-assignment operator as private.
This commit is contained in:
parent
72de00f672
commit
4b32a30593
@ -187,6 +187,11 @@ public:
|
||||
static void Free(void *ptr) { (void)ptr; } // Do nothing
|
||||
|
||||
private:
|
||||
//! Copy constructor is not permitted.
|
||||
MemoryPoolAllocator(const MemoryPoolAllocator& rhs) /* = delete */;
|
||||
//! Copy assignment operator is not permitted.
|
||||
MemoryPoolAllocator& operator=(const MemoryPoolAllocator& rhs) /* = delete */;
|
||||
|
||||
//! Creates a new chunk.
|
||||
/*! \param capacity Capacity of the chunk in bytes.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user