MemoryManager Class Referenceabstract

Configurable memory manager. More...

`#include <xercesc/framework/MemoryManager.hpp>`

## Public Member Functions

Destructor
virtual | ~MemoryManager ()
| Default destructor.
virtual MemoryManager * | getExceptionMemoryManager ()=0
| This method is called to obtain the memory manager that should be used to allocate memory used in exceptions.
The pure virtual methods in this interface.
virtual void * | allocate (XMLSize_t size)=0
| This method allocates requested memory.
virtual void | deallocate (void *p)=0
| This method deallocates memory.

## Constructor

| MemoryManager ()
| Protected default constructor.

## Detailed Description

Configurable memory manager.

This interface allows outside applications to plug in their own memory manager to be used by Xerces for memory allocation/deallocation.

## Constructor & Destructor Documentation

## ~MemoryManager()

virtual MemoryManager::~MemoryManager | ( |  | ) |

virtual

Default destructor.

## MemoryManager()

MemoryManager::MemoryManager | ( |  | ) |

protected

Protected default constructor.

## Member Function Documentation

## allocate()

virtual void * MemoryManager::allocate | ( | XMLSize_t | size | ) |

pure virtual

This method allocates requested memory.

Parameters

  size | The requested memory size

Returns
  A pointer to the allocated memory

Referenced by XMLString::replicate(), and XMLDateTime::setBuffer().

## deallocate()

virtual void MemoryManager::deallocate | ( | void * | p | ) |

pure virtual

This method deallocates memory.

Parameters

  p | The pointer to the allocated memory to be deleted

Referenced by XMLEntityDecl::setBaseURI(), XMLNotationDecl::setBaseURI(), XMLDateTime::setBuffer(), XMLAttDef::setEnumeration(), XMLEntityDecl::setNotationName(), XMLEntityDecl::setPublicId(), XMLNotationDecl::setPublicId(), XMLEntityDecl::setSystemId(), XMLNotationDecl::setSystemId(), XMLAttDef::setValue(), XMLEntityDecl::setValue(), AbstractDOMParser::useImplementation(), and PSVIAttribute::~PSVIAttribute().

## getExceptionMemoryManager()

virtual MemoryManager * MemoryManager::getExceptionMemoryManager | ( |  | ) |

pure virtual

This method is called to obtain the memory manager that should be used to allocate memory used in exceptions.

If the same memory manager can be used, simply return 'this' from this function. Note, however, that if there is a possibility that an exception thrown can outlive the memory manager (for example, because the memory manager object is allocated on the stack or is managed by a stack-bound object), it is recommended that you return XMLPlatformUtils::fgMemoryManager.

Returns
  A pointer to the memory manager

The documentation for this class was generated from the following file:

- MemoryManager.hpp