C++ Memory Library - shared_ptr



Description

It is an instrumental class and allows certain conversions that allow auto_ptr objects to be passed to and returned from functions.

Declaration

Following is the declaration for std::shared_ptr function.

template <class T> class shared_ptr;

C++11

template <class T> class shared_ptr;

Parameters

T − It is a managed object.

Member types

member type definition notes
element_type class template parameter (T) The type of the managed object
memory.htm
Advertisements