Namespaces
Variants

std::unique_ptr<T,Deleter>::release

From cppreference.com
Revision as of 19:53, 15 January 2012 by P12 (talk | contribs) (+)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:cpp/memory/unique ptr/sidebar

pointer release();
(since C++11)

Releases the ownership of the owned object. get() returns Template:cpp after the call.

Parameters

(none)

Return value

Pointer to the owned object, i.e. the value which would be returned by get() before the call.

Exceptions

noexcept specification:  
noexcept
  

Example

Template:example cpp

See also

Template:cpp/memory/unique ptr/dcl list getTemplate:cpp/memory/unique ptr/dcl list reset