Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) C++98STL std::tr1::shared_ptr

 

 

std::tr1::shared_ptr is a type of smart pointer that can be copied safely and cheap, without copying the object pointed to. When the last std::tr1::shared_ptr using an object goes out of scope, it will delete the object pointedto.

 

 

 

 

 

 

C++98STL Creating a std::tr1::shared_ptr

 

#include <tr1/memory>

int main()
{
  std::tr1::shared_ptr<int> p;
}

 

 

 

 

 

External links

 

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict