RTI Connext Modern C++ API
Version 6.0.1
|
#include <WeakReference.hpp>
Public Member Functions | |
WeakReference (const T &t) | |
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.
dds::core::WeakReference< T >::WeakReference | ( | const T & | t | ) |
Creates a weak reference for the reference type passed as argument
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