mirror of
https://github.com/esphome/esphome.git
synced 2026-02-08 00:31:58 +00:00
try to avoid bloat
This commit is contained in:
@@ -402,7 +402,7 @@ void Scheduler::full_cleanup_removed_items_() {
|
|||||||
this->recycle_item_main_loop_(std::move(this->items_[read]));
|
this->recycle_item_main_loop_(std::move(this->items_[read]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this->items_.resize(write);
|
this->items_.erase(this->items_.begin() + write, this->items_.end());
|
||||||
// Rebuild the heap structure since items are no longer in heap order
|
// Rebuild the heap structure since items are no longer in heap order
|
||||||
std::make_heap(this->items_.begin(), this->items_.end(), SchedulerItem::cmp);
|
std::make_heap(this->items_.begin(), this->items_.end(), SchedulerItem::cmp);
|
||||||
this->to_remove_ = 0;
|
this->to_remove_ = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user