#include "OdAlloc.h"
#include <new>
Go to the source code of this file.
◆ ODRX_HEAP_OPERATORS
#define ODRX_HEAP_OPERATORS |
( |
| ) |
|
Value:void* operator new(size_t s) \
{\
return p;\
}\
void* operator new[](size_t s) \
{\
return p;\
}\
void operator delete[](
void* p) {
::odrxFree(p); }\
void *operator new(size_t, void* p) throw() { return p; }\
void operator delete( void*, void* ) {}\
void *operator new[](size_t, void* p) throw() { return p; }\
void operator delete[]( void*, void* ) {}
ALLOCDLL_EXPORT void * odrxAlloc(size_t nBytes)
ALLOCDLL_EXPORT void odrxFree(void *pMemBlock)
Defines the new and delete operators for a class derived from the OdRxObject class.
Definition at line 76 of file OdHeap.h.
◆ ODRX_NO_HEAP_OPERATORS
#define ODRX_NO_HEAP_OPERATORS |
( |
| ) |
|
Value:void*
operator new(size_t )
throw() {
ODA_FAIL();
return 0; }\
void operator delete(
void* ) {
ODA_FAIL();
throw OdError(eNotApplicable); }\
void*
operator new[](size_t )
throw() {
ODA_FAIL();
return 0; }\
void operator delete[](
void* ) {
ODA_FAIL();
throw OdError(eNotApplicable); }
Defines the new and delete operators that generate the exception.
Definition at line 103 of file OdHeap.h.
◆ ODRX_USING_HEAP_OPERATORS
#define ODRX_USING_HEAP_OPERATORS |
( |
|
T | ) |
|
Value:using T::operator new;\
using T::operator delete;\
using T::operator new[];\
using T::operator delete[]
Defines the new and delete operators that use the new and delete operators of a base class.
Definition at line 140 of file OdHeap.h.