diff --git a/esphome/core/scheduler.cpp b/esphome/core/scheduler.cpp index 2cebd23cbd7..63e1006b03c 100644 --- a/esphome/core/scheduler.cpp +++ b/esphome/core/scheduler.cpp @@ -734,7 +734,7 @@ void Scheduler::recycle_item_main_loop_(SchedulerItem *item) { #ifdef ESPHOME_DEBUG_SCHEDULER ESP_LOGD(TAG, "Pool full (size: %zu), deleting item", this->scheduler_item_pool_.size()); #endif - delete_item_(item); + delete item; #ifdef ESPHOME_DEBUG_SCHEDULER this->debug_live_items_--; #endif diff --git a/esphome/core/scheduler.h b/esphome/core/scheduler.h index d7fba5df70b..3e74cad0023 100644 --- a/esphome/core/scheduler.h +++ b/esphome/core/scheduler.h @@ -353,9 +353,6 @@ class Scheduler { // IMPORTANT: Caller must hold the scheduler lock before calling this function. void recycle_item_main_loop_(SchedulerItem *item); - // Helper to delete a SchedulerItem - static void delete_item_(SchedulerItem *item) { delete item; } - // Helper to perform full cleanup when too many items are cancelled void full_cleanup_removed_items_();