Go to the source code of this file.
◆ JUCE_DECLARE_WEAK_REFERENCEABLE
| #define JUCE_DECLARE_WEAK_REFERENCEABLE |
( |
| Class | ) |
|
Value:struct WeakRefMaster :
public juce::WeakReference<Class>
::Master { ~WeakRefMaster() { this->clear(); } }; \
WeakRefMaster masterReference; \
friend class juce::WeakReference<Class>; \
Macro to easily allow a class to be made weak-referenceable. This can be inserted in a class definition to add the requisite weak-ref boilerplate to that class. e.g.
class MyObject
{
public:
MyObject();
~MyObject();
private:
};
#define JUCE_DECLARE_WEAK_REFERENCEABLE(Class)
Definition juce_WeakReference.h:234
- See also
- WeakReference, WeakReference::Master