DDS-PSM-C++ 1.0 ISO C++ API for OpenSplice DDS |
#include <WeakReference.hpp>
Public Types | |
typedef T | ReferenceType |
Public Member Functions | |
WeakReference (const T &t) | |
~WeakReference () | |
bool | expired () |
T | lock () |
The WeakReference
class allow to maintain a weak reference to a DDS reference type. Meaning that the existence of a weak link will not prevent the garbage collection of the reference type.
Definition at line 37 of file WeakReference.hpp.
typedef T dds::core::WeakReference< T >::ReferenceType |
Definition at line 39 of file WeakReference.hpp.
dds::core::WeakReference< T >::WeakReference | ( | const T & | t | ) |
Creates a weak reference for the reference type passed as argument
dds::core::WeakReference< T >::~WeakReference | ( | ) |
bool dds::core::WeakReference< T >::expired | ( | ) |
Checks whether the underlying reference has been collected.
T dds::core::WeakReference< T >::lock | ( | ) |
Gives access to the underlying reference. If the reference has expired the returned object will be referencing to null