Xerces-C++ 3.3.0
XMemory Class Reference

This class makes it possible to override the C++ memory management by adding new/delete operators to this base class. More...

#include <xercesc/util/XMemory.hpp>

Inheritance diagram for XMemory:
XSNamedMap< XSIDCDefinition > XSNamedMap< XSObject > AbstractDOMParser BinInputStream BinOutputStream DefaultPanicHandler Hash2KeysSetOf< THasher > Hash2KeysSetOfEnumerator< THasher > InputSource OutOfMemoryException PSVIAttributeList PSVIAttributeStorage PSVIItem QName SAXException SAXParser ValidationContext XMLAttDef XMLAttDefList XMLAttr XMLBigInteger XMLContentModel XMLElementDecl XMLEntityDecl XMLException XMLFileMgr XMLFormatTarget XMLFormatter XMLGrammarDescription XMLGrammarPool XMLInteger XMLLCPTranscoder XMLMutexMgr XMLNetAccessor XMLNotationDecl XMLNumber XMLStringTokenizer XMLTransService XMLTranscoder XMLURL XMLUri XMLValidator XSModel XSNamedMap< TVal > XSNamespaceItem XSObject XSValue

Public Member Functions

The C++ memory management
void * operator new (size_t size)
 This method overrides operator new.
 
void * operator new (size_t size, MemoryManager *memMgr)
 This method defines a custom operator new, that will use the provided memory manager to perform the allocation.
 
void * operator new (size_t size, void *ptr)
 This method overrides placement operator new.
 
void operator delete (void *p)
 This method overrides operator delete.
 
void operator delete (void *p, MemoryManager *memMgr)
 This method provides a matching delete for the custom operator new.
 
void operator delete (void *p, void *ptr)
 This method provides a matching delete for the placement new.
 

Protected Member Functions

Constructor
 XMemory ()
 Protected default constructor.
 

Detailed Description

This class makes it possible to override the C++ memory management by adding new/delete operators to this base class.

This class is used in conjunction with the pluggable memory manager. It allows applications to control Xerces memory management.

Constructor & Destructor Documentation

◆ XMemory()

XMemory::XMemory ( )
protected

Protected default constructor.

Member Function Documentation

◆ operator delete() [1/3]

void XMemory::operator delete ( void * p)

This method overrides operator delete.

Parameters
pThe pointer to the allocated memory

◆ operator delete() [2/3]

void XMemory::operator delete ( void * p,
MemoryManager * memMgr )

This method provides a matching delete for the custom operator new.

Parameters
pThe pointer to the allocated memory
memMgrAn application's memory manager

◆ operator delete() [3/3]

void XMemory::operator delete ( void * p,
void * ptr )

This method provides a matching delete for the placement new.

Parameters
pThe pointer to the allocated memory
ptrThe memory location where the object had to be allocated

◆ operator new() [1/3]

void * XMemory::operator new ( size_t size)

This method overrides operator new.

Parameters
sizeThe requested memory size

◆ operator new() [2/3]

void * XMemory::operator new ( size_t size,
MemoryManager * memMgr )

This method defines a custom operator new, that will use the provided memory manager to perform the allocation.

Parameters
sizeThe requested memory size
memMgrAn application's memory manager

◆ operator new() [3/3]

void * XMemory::operator new ( size_t size,
void * ptr )

This method overrides placement operator new.

Parameters
sizeThe requested memory size
ptrThe memory location where the object should be allocated

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