Smart pointers are objects that encapsulate built-in, or raw, pointers. They are useful as building blocks for implementing many idioms, including the handle-body and singleton patterns provided by this package. Smart pointers by themselves are useful for both exception-safe programming and automated garbage collection. Threads.h++ has always used some smart pointers internally, but in this release they have been uncovered and extended for your use.
The Threads.h++ Smart Pointer package provides the following features:
A handle-body implementation for creating your own handle-body hierarchies, allowing you to separate your abstractions from their implementations
A generic singleton template for adapting an existing class to behave as a singleton, enabling global access to a unique instance of the class
A simple pointer wrapper for local protection of heap allocations from memory leaks in the face of exceptions
Two varieties of thread-safe reference-counted pointers for adding exception safety and automated garbage collection to pointers that are shared among multiple objects
The Smart Pointer package depends on the Thread-compatible Exception, Execution Tracing, and Synchronization packages of Threads.h++.
The rw\pointer directory contains a header file for each class, named classname.h. You can also access the declarations for the entire Smart Pointer package through pointer.h, an umbrella file that includes the header files for all the classes.
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.