Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
grammar::recycled_ptr::recycled_ptr (1 of 6 overloads)

Constructor.

Synopsis
recycled_ptr(
    recycled< T >& bin);
Description

Upon construction, this will acquire exclusive access to an object of type T which is either recycled from the specified bin, or newly allocated. The object will be in an unknown but valid state.

Example
static recycled< std::string > bin;

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

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

Name

Description

bin

The recycle bin to use

See Also

recycled.


PrevUpHomeNext