Scaleform::WeakPtr
template <class C> class WeakPtr;
A weak pointer points at an object, but the object may be deleted at any time, in which case the weak pointer automatically becomes NULL. The only way to use a weak pointer is by converting it to a strong pointer (i.e. for temporary use).
The class pointed to must have a "WeakPtrProxy* GetWeakPtrProxy()" method.
Usage idiom:
if (Ptr<my_type> ptr = weak_ptr_to_my_type) { ... use ptr->whatever() safely in here ... }
Method |
Description |
Initializes WeakPtr. |
SF_RefCount.h