mirror of
https://github.com/esphome/esphome.git
synced 2025-11-17 23:35:47 +00:00
Fix descriptors not being deleted (#4104)
This commit is contained in:
@@ -29,6 +29,13 @@ BLEService::~BLEService() {
|
||||
delete chr; // NOLINT(cppcoreguidelines-owning-memory)
|
||||
}
|
||||
|
||||
void BLEService::release_characteristics() {
|
||||
this->parsed = false;
|
||||
for (auto &chr : this->characteristics)
|
||||
delete chr; // NOLINT(cppcoreguidelines-owning-memory)
|
||||
this->characteristics.clear();
|
||||
}
|
||||
|
||||
void BLEService::parse_characteristics() {
|
||||
this->parsed = true;
|
||||
uint16_t offset = 0;
|
||||
|
||||
Reference in New Issue
Block a user