[#boost-urls-grammar-recycled_ptr-2constructor-0ac]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/grammar.adoc[grammar]::xref:boost/urls/grammar/recycled_ptr.adoc[recycled&lowbar;ptr]::recycled&lowbar;ptr
:relfileprefix: ../../../../
:mrdocs:

Constructor

== Synopsis

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/recycled.hpp#L242[boost&sol;url&sol;grammar&sol;recycled&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
recycled&lowbar;ptr(
    xref:boost/urls/grammar/recycled.adoc[recycled&lt;T&gt;]& bin,
    std::nullptr&lowbar;t) noexcept;
----

== Description

After construction, this is empty and refers to the specified recycle bin&period;

== Example

[,cpp]
----
static recycled< std::string > bin;

recycled_ptr< std::string > ps( bin, nullptr );

// Acquire a string and put it into a known state
ps->acquire();
ps->clear();
----
== Postconditions

[,cpp]
----
&this->bin() == &bin && this->empty()
----
== Exception Safety

Throws nothing&period;

== Parameters

[cols=2]
|===
| Name
| Description
| *bin*
| The recycle bin to use
|===

== See Also

xref:boost/urls/grammar/recycled_ptr/acquire.adoc[`acquire`], xref:boost/urls/grammar/recycled.adoc[`recycled`], xref:boost/urls/grammar/recycled_ptr/release.adoc[`release`]&period;


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