#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) throw(std::bad_alloc)\
{\
if ( !p ) throw std::bad_alloc();\
return p;\
}\
void* operator new[](size_t s) throw(std::bad_alloc)\
{\
if ( !p ) throw std::bad_alloc();\
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* ) {}
Defines the new and delete operators for a class derived from the OdRxObject class.
Definition at line 74 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 101 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 138 of file OdHeap.h.