Name | Description |
---|---|
recycled_ptr [constructor] | Constructor |
~recycled_ptr [destructor] | Destructor |
operator= | Assignment |
acquire | Return the referenced object |
bin | Return the referenced recycle bin |
empty | Return true if this does not reference an object |
get | Return the referenced object |
operator* | Return the referenced object |
operator-> | Return the referenced object |
release | Release the referenced object |
operator bool | Return true if this references an object |
Name | Description |
---|---|
recycled |
A thread-safe collection of instances of T |
This is a smart pointer container which can acquire shared ownership of an instance of T
upon or after construction. The instance is guaranteed to be in a valid, but unknown state. Every recycled pointer references a valid recycle bin.
static recycled< std::string > bin;
recycled_ptr< std::string > ps( bin );
// Put the string into a known state
ps->clear();
Name | Description |
---|---|
T | the type of object to acquire, which must be DefaultConstructible. |