xercesc::MemoryManager Class Reference

Configurable memory manager. More...

#include <MemoryManager.hpp>

Inheritance diagram for xercesc::MemoryManager:
Inheritance graph

List of all members.

Public Member Functions

virtual MemoryManagergetExceptionMemoryManager ()=0
 This method is called to obtain the memory manager that should be used to allocate memory used in exceptions.

virtual ~MemoryManager ()
 Default destructor.
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.

Protected Member Functions


 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

virtual xercesc::MemoryManager::~MemoryManager (  )  [inline, virtual]

Default destructor.

xercesc::MemoryManager::MemoryManager (  )  [inline, protected]

Protected default constructor.

Member Function Documentation

virtual void* xercesc::MemoryManager::allocate ( XMLSize_t  size  )  [pure virtual]

This method allocates requested memory.

size The requested memory size
A pointer to the allocated memory

Referenced by XQillaAllocator< _Tp >::allocate(), and AutoDeallocate< TYPE >::AutoDeallocate().

virtual void xercesc::MemoryManager::deallocate ( void *  p  )  [pure virtual]

This method deallocates memory.

p The pointer to the allocated memory to be deleted

Implemented in XPath2MemoryManager.

Referenced by XQillaAllocator< _Tp >::deallocate(), AutoDeallocate< TYPE >::set(), AutoDeallocate< TYPE >::~AutoDeallocate(), and xercesc::DOMException::~DOMException().

virtual MemoryManager* xercesc::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.

A pointer to the memory manager

Referenced by xercesc::DOMException::DOMException().

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

Generated on Mon Mar 1 21:16:33 2010 for XQilla DOM Level 3 API by  doxygen 1.6.1