SourcePro® 2022.1 |
SourcePro® API Reference Guide |
Base class for subclasses that release client-allocated storage. More...
#include <rw/tools/bustring.h>
Public Member Functions | |
virtual | ~Deallocator () |
void | deallocate (RWUChar16 *p) |
void | deallocate (RWUChar16 *p) const |
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 std::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 doDeallocate() methods to avoid the ambiguities produced should the subclass declaration "hide" one of the superclass declarations of these functions.
|
virtual |
Required for virtual destruction.
|
inlineprotected |
Defined only to prevent direct instantiation of this class.
|
inline |
Forwards a deallocation request to a subclass-defined non-const
deallocation method.
|
inline |
Forwards a deallocation request to a subclass-defined const
deallocation method.
|
protectedvirtual |
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.
|
protectedpure 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.
Copyright © 2022 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |