1
0
mirror of https://github.com/esphome/esphome.git synced 2026-02-08 16:51:52 +00:00
This commit is contained in:
J. Nick Koston
2025-11-28 13:54:46 -06:00
parent ab6b4c77d2
commit ee91bb2405

View File

@@ -128,7 +128,8 @@ class OTAComponentBridge : public OTAStateListener {
class OTAGlobalCallback {
public:
void register_ota(OTAComponent *ota_caller) {
// Create a bridge that forwards this component's events to global listeners
// Create a bridge that forwards this component's events to global listeners.
// Intentionally never deleted - these objects live for the lifetime of the device.
auto *bridge = new OTAComponentBridge(this, ota_caller); // NOLINT(cppcoreguidelines-owning-memory)
ota_caller->add_state_listener(bridge);
}