SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Base class for subclasses that release client-allocated storage. More...
#include <rw/tools/bustring.h>
Public Member Functions | |
void | deallocate (RWUChar16 *p) |
void | deallocate (RWUChar16 *p) const |
virtual | ~Deallocator () |
Protected Member Functions | |
Deallocator () | |
virtual void | doDeallocate (RWUChar16 *p) |
virtual void | doDeallocate (RWUChar16 *p) const =0 |
Deallocator acts as an abstract base class for subclasses that release client-allocated storage.
Deallocator objects are required because RWBasicUString cannot assume that local invocation of methods such as operator delete[]
or free()
manipulate the same heap as that of the client. Such a case might arise if, for instance, an application contains some libraries that use debug versions of heap management routines while others do not.
A Deallocator subclass must override both doDeallocation() methods to avoid the ambiguities produced should the subclass declaration "hide" one of the superclass declarations of these functions.
virtual RWBasicUString::Deallocator::~Deallocator | ( | ) | [virtual] |
Required for virtual destruction.
RWBasicUString::Deallocator::Deallocator | ( | ) | [inline, protected] |
Defined only to prevent direct instantiation of this class.
void RWBasicUString::Deallocator::deallocate | ( | RWUChar16 * | p | ) | const [inline] |
Forwards a deallocation request to a subclass-defined const
deallocation method.
void RWBasicUString::Deallocator::deallocate | ( | RWUChar16 * | p | ) | [inline] |
Forwards a deallocation request to a subclass-defined non-const
deallocation method.
virtual void RWBasicUString::Deallocator::doDeallocate | ( | RWUChar16 * | p | ) | const [protected, pure virtual] |
A pure virtual function that must be implemented in each subclass. A subclass implementation should take whatever actions are required to deallocate the storage identified by p.
Implemented in RWBasicUString::StaticDeallocator.
virtual void RWBasicUString::Deallocator::doDeallocate | ( | RWUChar16 * | p | ) | [protected, virtual] |
A virtual function that must be implemented in each subclass. A subclass implementation should take whatever actions are required to deallocate the storage identified by p. The default implementation of this function simply forwards to the const
version.
Reimplemented in RWBasicUString::StaticDeallocator.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.