|
My Project
|
DONOT use this class directly, use weak_ptr instead. More...
#include <PERef.h>
Public Member Functions | |
| weak_ref_object (T *pWatchedObject) | |
| bool | expired () const |
| bool | IsValid () const |
| T * | get () const |
| get the watched real object pointer | |
| operator T* () | |
| void | UnWatch () |
| this is usually called in the destructor of type T, so that we know that the pointer is invalid. | |
Public Member Functions inherited from ParaEngine::CRefCounted | |
| void | addref () const |
| add reference count of the object. More... | |
| bool | delref () const |
| decrease reference count of the object. More... | |
| int | GetRefCount () const |
| get the reference count | |
| virtual int | Release () |
| CRefCounted * | AddToAutoReleasePool () |
| addref and releases the ownership sometime soon automatically (usually at the end of the current frame). More... | |
Protected Attributes | |
| T * | m_watched_object |
Protected Attributes inherited from ParaEngine::CRefCounted | |
| int | m_refcount |
DONOT use this class directly, use weak_ptr instead.
single threaded weak reference class to work with intrusive reference count class T. T is usually CRefCounted derived class like CBaseObject.
1.8.12