Namespaces
Variants
Views
Actions

std::unique_ptr::reset

From cppreference.com
 
 
 
 
 
void reset( pointer ptr = pointer() );
(since C++11)

Replaces the managed object. If *this manages an object, it is deleted, unless ptr is a pointer to it.

Contents

[edit] Parameters

ptr - pointer to a new object to manage

[edit] Return value

(none)

[edit] Example

[edit] See also

returns a pointer to the managed object and releases the ownership
(public member function) [edit]