mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added JUCE_DECLARE_WEAK_REFERENCEABLE macro to make it easier to creat weak-referenceable classes
This commit is contained in:
parent
b44cb8b710
commit
1aaa598a5f
13 changed files with 50 additions and 62 deletions
|
|
@ -59,8 +59,6 @@ ActionBroadcaster::~ActionBroadcaster()
|
|||
{
|
||||
// all event-based objects must be deleted BEFORE juce is shut down!
|
||||
jassert (MessageManager::getInstanceWithoutCreating() != nullptr);
|
||||
|
||||
masterReference.clear();
|
||||
}
|
||||
|
||||
void ActionBroadcaster::addActionListener (ActionListener* const listener)
|
||||
|
|
|
|||
|
|
@ -64,15 +64,13 @@ public:
|
|||
|
||||
private:
|
||||
//==============================================================================
|
||||
friend class WeakReference<ActionBroadcaster>;
|
||||
WeakReference<ActionBroadcaster>::Master masterReference;
|
||||
|
||||
class ActionMessage;
|
||||
friend class ActionMessage;
|
||||
|
||||
SortedSet<ActionListener*> actionListeners;
|
||||
CriticalSection actionListenerLock;
|
||||
|
||||
JUCE_DECLARE_WEAK_REFERENCEABLE (ActionBroadcaster)
|
||||
JUCE_DECLARE_NON_COPYABLE (ActionBroadcaster)
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue