[#bsl-shared_ptr-0a-release]
= xref:bsl.adoc[bsl]::xref:bsl/shared_ptr-0a.adoc[shared&lowbar;ptr]::release
:relfileprefix: ../../
:mrdocs:

Release ownership and return the pointer and representation addresses&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;sharedptr&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/pair-0b.adoc[pair&lt;element&lowbar;type*, BloombergLP::bslma::SharedPtrRep*&gt;]
release() noexcept;
----

== Description

Return the pair consisting of the addresses of the modifiable `ELEMENT&lowbar;TYPE` object referred to, and the representation shared by, this shared pointer, and reset this shared pointer to the empty state, referring to no object, with no effect on the representation&period; The reference counter is not modified nor is the shared object deleted&semi; if the reference count of the representation is greater than one, then it is not safe to release the representation (thereby destroying the shared object), but it is always safe to create another shared pointer with the representation using the constructor with the following signature&colon; &grave; &apos;shared&lowbar;ptr(ELEMENT&lowbar;TYPE &ast;ptr, BloombergLP&colon;&colon;bslma&colon;&colon;SharedPtrRep &ast;rep)&apos; &grave; Note that this function returns a pair of null pointers if this shared pointer is empty&period;

== Return Value

pair of the object pointer and representation addresses


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