mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-28 02:30:05 +00:00
New class: WeakReference. Used this to clean up and simplify implementation of Component::SafePointer and BailOutChecker.
This commit is contained in:
parent
d60f661789
commit
2bb0c77216
41 changed files with 655 additions and 275 deletions
|
|
@ -320,7 +320,7 @@ void Desktop::handleAsyncUpdate()
|
|||
{
|
||||
// The component may be deleted during this operation, but we'll use a SafePointer rather than a
|
||||
// BailOutChecker so that any remaining listeners will still get a callback (with a null pointer).
|
||||
Component::SafePointer<Component> currentFocus (Component::getCurrentlyFocusedComponent());
|
||||
WeakReference<Component> currentFocus (Component::getCurrentlyFocusedComponent());
|
||||
focusListeners.call (&FocusChangeListener::globalFocusChanged, currentFocus);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue