Forwards deallocation requests to a static callback method.
More...
#include <rw/tools/bustring.h>
StaticDeallocator forwards deallocation requests to a simple, client-defined, static callback method of the form:
◆ StaticDeallocator()
RWBasicUString::StaticDeallocator::StaticDeallocator |
( |
void(* | deallocator )(RWUChar16 *), |
|
|
bool | destroyAfterDeallocate = false ) |
Constructs and initializes an instance with a pointer to a client-supplied deallocation function. The destroyAfterDeallocate is used to control the life-span of a StaticDeallocator instance. A value of true
causes the StaticDeallocator to delete itself immediately after calling the deallocator function.
◆ ~StaticDeallocator()
virtual RWBasicUString::StaticDeallocator::~StaticDeallocator |
( |
| ) |
|
|
virtual |
Required for virtual destruction.
◆ doDeallocate() [1/2]
virtual void RWBasicUString::StaticDeallocator::doDeallocate |
( |
RWUChar16 * | p | ) |
|
|
inlineprotectedvirtual |
◆ doDeallocate() [2/2]
virtual void RWBasicUString::StaticDeallocator::doDeallocate |
( |
RWUChar16 * | p | ) |
const |
|
protectedvirtual |
◆ deallocator_
void(* RWBasicUString::StaticDeallocator::deallocator_) (RWUChar16 *) |
|
private |
The client-supplied deallocator callback function.
◆ destroyAfterDeallocate_
bool RWBasicUString::StaticDeallocator::destroyAfterDeallocate_ |
|
private |
Controls destruction of self.