This class is embedded inside an object to which you want to attach WeakReference pointers. More...
#include <juce_WeakReference.h>
Public Member Functions | |
Master ()=default | |
~Master () noexcept | |
void | clear () noexcept |
The object that owns this master pointer should call this before it gets destroyed, to zero all the references to this object that may be out there. More... | |
int | getNumActiveWeakReferences () const noexcept |
Returns the number of WeakReferences that are out there pointing to this object. More... | |
SharedRef | getSharedPointer (ObjectType *object) |
The first call to this method will create an internal object that is shared by all weak references to the object. More... | |
Private Attributes | |
SharedRef | sharedPointer |
This class is embedded inside an object to which you want to attach WeakReference pointers.
See the WeakReference class notes for an example of how to use this class.
|
default |
|
inlinenoexcept |
|
inlinenoexcept |
The object that owns this master pointer should call this before it gets destroyed, to zero all the references to this object that may be out there.
See the WeakReference class notes for an example of how to do this.
References juce::WeakReference< ObjectType, ReferenceCountingType >::Master::sharedPointer.
|
inlinenoexcept |
Returns the number of WeakReferences that are out there pointing to this object.
References juce::WeakReference< ObjectType, ReferenceCountingType >::Master::sharedPointer.
|
inline |
The first call to this method will create an internal object that is shared by all weak references to the object.
References juce::ReferenceCountedObjectPtr< ObjectType >::get(), jassert, and juce::WeakReference< ObjectType, ReferenceCountingType >::Master::sharedPointer.
|
private |
Referenced by juce::WeakReference< ObjectType, ReferenceCountingType >::Master::clear(), juce::WeakReference< ObjectType, ReferenceCountingType >::Master::getNumActiveWeakReferences(), juce::WeakReference< ObjectType, ReferenceCountingType >::Master::getSharedPointer(), and juce::WeakReference< ObjectType, ReferenceCountingType >::Master::~Master().