setMemoryManager

The setMemoryManager method specifies the current framework memory manager. It controls memory allocated in the framework at the application level (for example, when adding an object to a relation implemented as OMList). If you do not register a memory manager, the framework uses the global new and delete operators.

To have an effect, call this method before making any memory allocation requests, or compile the framework with the OM_ENABLE_MEMORY_MANAGER_SWITCH compiler flag.

Visibility
Public
Signature
static OMBoolean setMemoryManager(
   OMAbstractMemoryAllocator* const memoryManager);
Parameters
memoryManager

Specifies the new framework memory manager

Returns

The method returns TRUE if the memory manager was set successfully. Otherwise, it returns FALSE.


Feedback