##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::get_deleter

From cppreference.com
< cpp‎ | memory‎ | shared ptr

template<class Deleter, class T> Deleter* get_deleter(const shared_ptr<T> & p) const; |  |

Access to the `p`'s deleter. The std::shared_ptr must have been created with one of the constructors that take a deleter as a parameter. Otherwise, it will return 0.

### [edit] Parameters

(none)

### [edit] Return value

A pointer to the owned deleter or 0.

### [edit] See also

(constructor) | std::shared_ptr constructors (public member function)

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/memory/shared_ptr/get_deleter&oldid=50169"