WeakPtr

WeakPtr
Scaleform::WeakPtr
Declaration
template <class C>
class WeakPtr;
Description

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 ... }
Methods
Method 
Description 
Initializes WeakPtr. 
Operators
Operator 
Description 
= 
Default constructor and assignment from WeakPtr are OK. 
== 
Compares two weak pointers. 
Conversion to Ptr
File

SF_RefCount.h