C++ Language/Indirection/SmartPointers

A "smart pointer" is an object which manages an allocation of memory, so that memory gets deallocated at the appropriate time.

  1. Risk from Raw Pointers
  2. Unique Ownership
  3. Shared Ownership
  4. Ownership Cycle
  5. Owning an Array
  6. Pointer to Base-Class
  7. Returning this
  8. Smart Compiler-Temporary
  9. Custom Destruction
  10. Template-Parameter