std::unique_ptr::release
From Cppreference
< cpp | memory | unique ptr
pointer release();
|
(since C++11) | |
Releases the ownership of the managed object if any. get() returns nullptr after the call.
Contents |
[edit] Parameters
(none)
[edit] Return value
Pointer to the managed object or nullptr if there was no managed object, i.e. the value which would be returned by get() before the call.
[edit] Exceptions
[edit] Example
This section is incomplete |
[edit] See also
returns a pointer to the managed object (public member function) |
|
replaces the managed object (public member function) |