|
UraniumCompute 0.1.0
A GPU accelerated parallel task scheduler
|
Base class for dynamic reference counted objects. More...
#include <Object.h>
Public Member Functions | |
| Object (const Object &)=delete | |
| Object (Object &&)=delete | |
| UInt32 | AddRef () override |
| Add a strong reference to the object. More... | |
| UInt32 | Release () override |
| void | AttachRefCounter (ReferenceCounter *pRefCounter) override |
| Attach a reference counter to the object. More... | |
| ReferenceCounter * | GetRefCounter () override |
| Get reference counter attached to this object. | |
Protected Member Functions | |
| template<class F > | |
| UInt32 | Release (F &&destroyCallback) |
Base class for dynamic reference counted objects.
Example:
| TInterface | - The type of interface the object must implement. |
|
inlineoverride |
Add a strong reference to the object.
|
inlineoverride |
Attach a reference counter to the object.
| pRefCounter | - Reference counter to attach. |
|
inlineoverride |
Directly uses ReferenceCounter::ReleaseStrongRef, but also calls the virtual destructor of itself (commits suicide) when the reference counter reaches zero.