Loading...
Searching...
No Matches
juce::Component::BailOutChecker Class Reference

Detailed Description

A class to keep an eye on a component and check for it being deleted.

This is designed for use with the ListenerList::callChecked() methods, to allow the list iterator to stop cleanly if the component is deleted by a listener callback while the list is still being iterated.

Public Member Functions

 BailOutChecker (Component *component)
 Creates a checker that watches one component.
bool shouldBailOut () const noexcept
 Returns true if either of the two components have been deleted since this object was created.

Constructors and Destructors

◆ BailOutChecker()

juce::Component::BailOutChecker::BailOutChecker ( Component * component)

Creates a checker that watches one component.

References juce::Component::Component().

Referenced by shouldBailOut().

Member Functions

◆ shouldBailOut()

bool juce::Component::BailOutChecker::shouldBailOut ( ) const
noexcept

Returns true if either of the two components have been deleted since this object was created.

References BailOutChecker(), and juce::Component::Component().

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram