FastLED 3.9.15
Loading...
Searching...
No Matches

◆ ~Listener()

fl::EngineEvents::Listener::~Listener ( )
virtual

Reimplemented in fl::Button::Listener, fl::UIButton::Listener, fl::UICheckbox::Listener, fl::UIDropdown::Listener, fl::UINumberField::Listener, fl::UISlider::Listener, UIButton::Listener, UICheckbox::Listener, UIDropdown::Listener, UINumberField::Listener, and UISlider::Listener.

Definition at line 12 of file engine_events.cpp.

12 {
13#if FASTLED_HAS_ENGINE_EVENTS
14 EngineEvents *ptr = EngineEvents::getInstance();
15 const bool has_listener = ptr && ptr->_hasListener(this);
16 if (has_listener) {
17 // Warning, the listener should be removed by the subclass. If we are
18 // here then the subclass did not remove the listener and we are now in
19 // a partial state of destruction and the results may be undefined for
20 // multithreaded applications. However, for single threaded (the only
21 // option as of 2024, October) this will be ok.
22 ptr->_removeListener(this);
23 }
24#endif
25}
EngineEvents()=default

References fl::EngineEvents::EngineEvents(), fl::EngineEvents::_hasListener(), and fl::EngineEvents::_removeListener().

+ Here is the call graph for this function: