Base class for an object with a reference counter. More...
Public Member Functions | |
| ObjectImpl (const ObjectImpl &rhs)=delete | |
| ObjectImpl & | operator= (const ObjectImpl &rhs)=delete |
| void | addRef () |
| Increments the reference counter. | |
| void | removeRef () |
| Decrements the reference counter. | |
| Int32 | refCount () const |
| Returns the value of the reference counter. | |
| virtual void | deleteMe () |
| Destroys this object. | |
Static Private Member Functions | |
| static void | _noReferenceErrorCallTerminate (const void *ptr) |
Private Attributes | |
| std::atomic< Int32 > | m_ref_count |
| Number of references on the object. | |
Base class for an object with a reference counter.
These objects are managed by a reference counter.
Definition at line 39 of file arccore/src/common/arccore/common/Collection.h.
|
inline |
Definition at line 43 of file arccore/src/common/arccore/common/Collection.h.
|
inlinevirtual |
Definition at line 47 of file arccore/src/common/arccore/common/Collection.h.
|
staticprivate |
Definition at line 43 of file Collection.cc.
|
inline |
Increments the reference counter.
Definition at line 53 of file arccore/src/common/arccore/common/Collection.h.
References m_ref_count.
|
inlinevirtual |
Destroys this object.
Reimplemented in Arcane::ProxyItemVariableNull.
Definition at line 69 of file arccore/src/common/arccore/common/Collection.h.
Referenced by removeRef().
|
inline |
Returns the value of the reference counter.
Definition at line 64 of file arccore/src/common/arccore/common/Collection.h.
References m_ref_count.
|
inline |
Decrements the reference counter.
Definition at line 55 of file arccore/src/common/arccore/common/Collection.h.
References deleteMe(), and m_ref_count.
|
private |
Number of references on the object.
Definition at line 73 of file arccore/src/common/arccore/common/Collection.h.
Referenced by addRef(), refCount(), and removeRef().