72 oldPtr->weakHandle =
nullptr;
80 if (!ptr->weakHandle) {
100 operator T*()
const {
103 explicit operator bool()
const {
Root namespace for the Rack API.
Definition AudioDisplay.hpp:9
Base class for classes that allow WeakPtrs to be used.
Definition weakptr.hpp:16
size_t getWeakCount()
Definition weakptr.hpp:24
~WeakBase()
Definition weakptr.hpp:19
WeakHandle * weakHandle
Definition weakptr.hpp:17
size_t count
Definition weakptr.hpp:10
void * ptr
Definition weakptr.hpp:9
WeakHandle(void *ptr)
Definition weakptr.hpp:11
A weak pointer to a subclass of WeakBase.
Definition weakptr.hpp:47
T * get() const
Definition weakptr.hpp:89
void set(T *ptr)
Definition weakptr.hpp:64
T & operator*() const
Definition weakptr.hpp:97
WeakPtr(T *ptr)
Definition weakptr.hpp:51
WeakPtr(const WeakPtr &other)
Definition weakptr.hpp:54
~WeakPtr()
Definition weakptr.hpp:61
WeakPtr()
Definition weakptr.hpp:50
WeakHandle * weakHandle
Definition weakptr.hpp:48
WeakPtr & operator=(const WeakPtr &other)
Definition weakptr.hpp:57
T * operator->() const
Definition weakptr.hpp:94