OMMemoryManager is the default memory manager for the framework. It is part of the mechanism that enables you to use custom memory managers.
The OXF had built-in memory control support for the following elements:
The OMMemoryManager class supports user control over memory allocation.
In addition, protection against early destruction on application exit is provided. This protection ensures that the internal memory manager singleton is valid throughout the termination of the application. To accomplish this, the following members are supplied in the class:
OM_DECLARE_FRAMEWORK_MEMORY_ALLOCATION_OPERATORS
The macros and operators support user control over memory allocation. The new parameter NEW_DUMMY_PARAM is set to "size_t=0" for every compiler.
The updated definition is as follows:
define OM_DECLARE_FRAMEWORK_MEMORY_ALLOCATION_OPERATORS
public:
static void* operator new (size_t size
NEW_DUMMY_PARAM)
static void* operator new[] (size_t size
NEW_DUMMY_PARAM
static void operator delete (void * object,
size_t size)
static void operator delete[] (void * object,
size_t size)
Allocates memory using either the memory manager or the global new operator (when the framework and application are compiled with OM_NO_FRAMEWORK_MEMORY_MANAGER).
#define OMGET_MEMORY(size)
Allocates memory using either the memory manager or the global new operator (when the framework and application are compiled with OM_NO_FRAMEWORK_MEMORY_MANAGER).
#define OMNEW(type, size)
Deletes the specified memory using either the memory manager or the global delete operator (when the framework and application are compiled with the OM_NO_FRAMEWORK_MEMORY_MANAGER switch).
#define OMDELETE(object,size)