mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-05 03:50:07 +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
|
|
@ -264,7 +264,7 @@ void Label::hideEditor (const bool discardCurrentEditorContents)
|
|||
{
|
||||
if (editor != 0)
|
||||
{
|
||||
Component::SafePointer<Component> deletionChecker (this);
|
||||
WeakReference<Component> deletionChecker (this);
|
||||
|
||||
editorAboutToBeHidden (editor);
|
||||
|
||||
|
|
@ -448,7 +448,7 @@ void Label::textEditorReturnKeyPressed (TextEditor& ed)
|
|||
|
||||
if (changed)
|
||||
{
|
||||
Component::SafePointer<Component> deletionChecker (this);
|
||||
WeakReference<Component> deletionChecker (this);
|
||||
textWasEdited();
|
||||
|
||||
if (deletionChecker != 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue