Loading...
Searching...
No Matches
juce_WeakReference.h File Reference

Classes

class  juce::WeakReference< ObjectType, ReferenceCountingType >
 This class acts as a pointer which will automatically become null if the object to which it points is deleted. More...
class  juce::WeakReference< ObjectType, ReferenceCountingType >::SharedPointer
 This class is used internally by the WeakReference class - don't use it directly in your code! More...
class  juce::WeakReference< ObjectType, ReferenceCountingType >::Master
 This class is embedded inside an object to which you want to attach WeakReference pointers. More...

Namespaces

namespace  juce

Macros

#define JUCE_DECLARE_WEAK_REFERENCEABLE(Class)
 Macro to easily allow a class to be made weak-referenceable.

Macro Definition Documentation

◆ 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>; \
This class acts as a pointer which will automatically become null if the object to which it points is...
Definition juce_WeakReference.h:90

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)
Macro to easily allow a class to be made weak-referenceable.
Definition juce_WeakReference.h:243
See also
WeakReference, WeakReference::Master
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram