Cpp Smart Pointers


A smart pointer simulates a pointer while providing additional features.In C++, smart pointers are implemented as a template class.

Reasons for using them

  • Less bugs: Automatic initialization and elimination of dangling pointers.
  • Exception safety
  • Garbage collection
  • Efficiency


Smart pointer that is included in the standard C++ library.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.