diff --git a/esphome/core/scheduler.h b/esphome/core/scheduler.h index 8d6998ef2cb..d7fba5df70b 100644 --- a/esphome/core/scheduler.h +++ b/esphome/core/scheduler.h @@ -353,13 +353,8 @@ 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 (clears callback then frees memory) - static void delete_item_(SchedulerItem *item) { - if (item != nullptr) { - item->callback = nullptr; - delete 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_();