libsq3
2007.10.18
|
The refcount namespace encapsulates code for a reference-counted smart pointer. More...
Namespaces | |
Detail | |
All classes in this namespace are "internal details" of the classes in the refcount namespace, and should not be directly used by client code. | |
Classes | |
struct | no_delete_finalizer |
A no-op "destructor" for use with rcptr. More... | |
struct | plain_delete_finalizer |
The default destructor/cleanup functor for use with rcptr<>. More... | |
class | rcptr |
The refcount namespace encapsulates code for a reference-counted smart pointer.
It is capable of tracking and destroying objects and arbitrary pointers (including void pointers) and destroying them using a user-defined finalizer functor. This allows, e.g., the reference-counted sharing of memory allocated via malloc() or by third-party functions such as dlopen() or sqlite3_open().
This code is not generic, industrial-strength reference counting and is as much an experiment as anything else.
Author: stephan at s11n dot net
License: Public Domain