[#boost-urls-grammar-recycled_ptr-2constructor-08]
= 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#L208[boost&sol;url&sol;grammar&sol;recycled&period;hpp]&gt;`

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

== Description

Upon construction, this acquires exclusive access to an object of type `T` which is either recycled from the specified bin, or newly allocated&period; The object is in an unknown but valid state&period;

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

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

// Put the string into a known state
ps->clear();
----
== Postconditions
[,cpp]
----
&this->bin() == &bin && ! this->empty()
----
== Parameters

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

== See Also

xref:boost/urls/grammar/recycled.adoc[`recycled`]&period;


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