std::unique_ptr::reset
From cppreference.com
                    
                                        
                    < cpp | memory | unique ptr
                    
                                                            
                    |   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
| This section is incomplete Reason: no example  | 
[edit] See also
|    returns a pointer to the managed object and releases the ownership   (public member function)  | |