A smart pointer is an abstract data type that simulates a pointer, providing additional features for accessing objects and managing memory at run-time, for example, automatic destroying of unused objects, throwing of exceptions, inspecting owners, or checking bounds.
Overview of Classes that Implement Smart Pointers
Creating an Empty Implementation of the Reference Counter
Using an Empty Implementation of the Reference Counter
Creating a Standard Implementation of the Reference Counter
Using the Standard Implementation of the Reference Counter
Example of Counting References
Functionality of Smart Pointers
Example of Assigning Smart Pointers
Example of a Typified Smart Pointer
Example of a Non-Typified Smart Pointer
Copyright © 2002 – 2020. Open Design Alliance. All rights reserved.
|