mirror of
https://github.com/esphome/esphome.git
synced 2025-10-05 19:33:47 +01:00
ble pool
This commit is contained in:
@@ -64,11 +64,8 @@ template<uint8_t SIZE> class BLEEventPool {
|
|||||||
|
|
||||||
// Events are reused - the load methods handle cleanup
|
// Events are reused - the load methods handle cleanup
|
||||||
// Just return to free list
|
// Just return to free list
|
||||||
if (!this->free_list_.push(event)) {
|
this->free_list_.push(event);
|
||||||
// This should not happen if pool size matches queue size
|
// Push cannot fail: pool size = queue size, and we never exceed pool size
|
||||||
// But if it does, delete the event to prevent leak
|
|
||||||
delete event;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get total number of events created (high water mark)
|
// Get total number of events created (high water mark)
|
||||||
|
Reference in New Issue
Block a user