Shared reader handle to a read-mostly managed object.
Declared in <folly/concurrency/memory/ReadMostlySharedPtr.h>
template<
typename U,
typename RefCount2 = DefaultRefCount>
class ReadMostlySharedPtr;
A cheaply copyable pointer that keeps the object alive while it is held. It is typically obtained from a ReadMostlyMainPtr or ReadMostlyWeakPtr and is meant for the read-mostly access path.
| Name | Description |
|---|---|
ReadMostlySharedPtr [constructor] | Constructors |
~ReadMostlySharedPtr [destructor] | Destroys the shared pointer and releases its reference. |
operator= | Assignment operators |
get | Returns the raw pointer to the referenced object. |
getStdShared | Returns a standard shared pointer aliasing the referenced object. |
operator* | Dereferences the referenced object. |
operator-> | Accesses members of the referenced object. |
reset | Releases the reference, making this pointer empty. |
unique | Tests whether this is the only reference to the object. |
use_count | Returns the current reference count of the object. |
operator bool | Tests whether the pointer references an object. |
operator== | Equality operators |
| Name | Description |
|---|---|
folly::ReadMostlySharedPtr | Shared reader handle to a read-mostly managed object. |
folly::ReadMostlyWeakPtr | Non-owning weak reference to a read-mostly managed object. |
| Name | Description |
|---|---|
operator!= | Tests whether a shared pointer is non-empty. |
operator== | Tests whether a shared pointer is empty. |
tryGetShutdownSocketSetFast | Returns the process-global shutdown socket set using a read-mostly pointer. |
| Name | Description |
|---|---|
| T | The pointed-to object type. |
| RefCount | The reference-count implementation to use. |