[#BloombergLP-bslma-ManagedPtr-0fa-release-0e]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/ManagedPtr-0fa.adoc[ManagedPtr]::release
:relfileprefix: ../../../
:mrdocs:

Release ownership and return the target pointer with its deleter&period;

== Synopsis

Declared in `&lt;bslma&lowbar;managedptr&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslma/ManagedPtr_PairProxy.adoc[ManagedPtr&lowbar;PairProxy&lt;TARGET&lowbar;TYPE, ManagedPtrDeleter&gt;]
release();
----

== Description

Return a raw pointer to the current target object (if any) and the deleter for the currently managed object, and reset this managed pointer to empty&period; It is undefined behavior to run the returned deleter unless the returned pointer to target object is not null&period;

== Return Value

pair of the target pointer and the deleter for the managed object


[.small]#Created with https://www.mrdocs.com[MrDocs]#
