forked from qt-creator/qt-creator
Introduced CPlusPlus::Managed.
Managed is an helper base class that simplify the usage of memory pools.
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
|
||||
#include "CPlusPlusForwardDeclarations.h"
|
||||
#include <cstddef>
|
||||
#include <new>
|
||||
|
||||
CPLUSPLUS_BEGIN_HEADER
|
||||
CPLUSPLUS_BEGIN_NAMESPACE
|
||||
@@ -99,6 +100,20 @@ private:
|
||||
};
|
||||
};
|
||||
|
||||
class CPLUSPLUS_EXPORT Managed
|
||||
{
|
||||
Managed(const Managed &other);
|
||||
void operator = (const Managed &other);
|
||||
|
||||
public:
|
||||
Managed();
|
||||
virtual ~Managed();
|
||||
|
||||
void *operator new(size_t size, MemoryPool *pool);
|
||||
void operator delete(void *);
|
||||
void operator delete(void *, MemoryPool *);
|
||||
};
|
||||
|
||||
CPLUSPLUS_END_NAMESPACE
|
||||
CPLUSPLUS_END_HEADER
|
||||
|
||||
|
||||
Reference in New Issue
Block a user