diff --git a/include/effect_clock.h b/include/effect_clock.h index 770fc40..343e951 100644 --- a/include/effect_clock.h +++ b/include/effect_clock.h @@ -10,7 +10,7 @@ protected: Window* window = new Window(0, LED_HEIGHT - 6, LED_WIDTH, 6); public: - ~ClockEffect(); + virtual ~ClockEffect(); virtual void loop(uint16_t ms); String get_name() override { return "clock"; } void loop_with_invert(bool invert); @@ -20,5 +20,6 @@ public: class NightClockEffect : public ClockEffect { public: NightClockEffect(); + ~NightClockEffect(); void loop(uint16_t ms) override; }; diff --git a/src/effect_clock.cpp b/src/effect_clock.cpp index d34f370..df441aa 100644 --- a/src/effect_clock.cpp +++ b/src/effect_clock.cpp @@ -66,3 +66,7 @@ void ClockEffect::loop(boolean invert, CRGB fg_color, CRGB bg_color, uint8_t yPo ClockEffect::~ClockEffect() { delete window; } + +NightClockEffect::~NightClockEffect() { + delete window; +} \ No newline at end of file