Namespaces
Variants
Views
Actions

std::default_delete

From cppreference.com
 
 
 
 
Defined in header <memory>
template< class T > struct default_delete
(1) (since C++11)
template< class T > struct default_delete<T[]>
(2) (since C++11)

std::default_delete is the default destruction policy used by std::unique_ptr if no deleter was specified.

1) Non-specialized default_delete uses delete to delete a single object

2) Partial specialization for array types is provided, it uses delete[] instead.

[edit] Member functions

constructs a default_delete object
(public member function)
deletes the object or array
(public member function)

[edit] See also

smart pointer with unique object ownership semantics
(class template) [edit]