Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

UMemory Class Reference

UMemory is the common ICU base class. More...

#include <uobject.h>

Inheritance diagram for UMemory::

UObject BreakIterator Calendar CanonicalIterator CollationElementIterator CollationKey Collator DateFormatSymbols DecimalFormatSymbols FieldPosition Format Formattable ForwardCharacterIterator ICULayoutEngine LayoutEngine Locale Normalizer ParsePosition RegexMatcher RegexPattern Replaceable ResourceBundle SearchIterator StringEnumeration TimeZone Transliterator UnicodeFunctor UnicodeSetIterator List of all members.

Public Methods

void * operator new (size_t size)
 Override for ICU4C C++ memory management. More...

void * operator new[] (size_t size)
 Override for ICU4C C++ memory management. More...

void operator delete (void *p)
 Override for ICU4C C++ memory management. More...

void operator delete[] (void *p)
 Override for ICU4C C++ memory management. More...


Detailed Description

UMemory is the common ICU base class.

All other ICU C++ classes are derived from UMemory (starting with ICU 2.4).

This is primarily to make it possible and simple to override the C++ memory management by adding new/delete operators to this base class.

To override ALL ICU memory management, including that from plain C code, replace the allocation functions declared in cmemory.h

UMemory does not contain any virtual functions. Common "boilerplate" functions are defined in UObject.

Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

Definition at line 58 of file uobject.h.


Member Function Documentation

void UMemory::operator delete void *    p
 

Override for ICU4C C++ memory management.

simple, non-class types are allocated using the macros in common/cmemory.h (uprv_malloc(), uprv_free(), uprv_realloc()); they or something else could be used here to implement C++ new/delete for ICU4C C++ classes

Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

void UMemory::operator delete[] void *    p
 

Override for ICU4C C++ memory management.

See delete().

Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

void* UMemory::operator new size_t    size
 

Override for ICU4C C++ memory management.

simple, non-class types are allocated using the macros in common/cmemory.h (uprv_malloc(), uprv_free(), uprv_realloc()); they or something else could be used here to implement C++ new/delete for ICU4C C++ classes

Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

void* UMemory::operator new[] size_t    size
 

Override for ICU4C C++ memory management.

See new().

Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.


The documentation for this class was generated from the following file:
Generated on Wed Dec 18 16:52:26 2002 for ICU 2.4 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001