mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2025-07-30 10:27:14 +02:00
[Bugfix] NimBLEScan delete.
Calling NimBLEDevice::deint with the `clearAll` parameter set to `true` will delete the scan and any scan results but it was calling `clearall` which uses critical sections, this could cause a crash because the stack has already been de-initialized.
This commit is contained in:
@ -41,7 +41,9 @@ NimBLEScan::NimBLEScan()
|
|||||||
* @brief Scan destructor, release any allocated resources.
|
* @brief Scan destructor, release any allocated resources.
|
||||||
*/
|
*/
|
||||||
NimBLEScan::~NimBLEScan() {
|
NimBLEScan::~NimBLEScan() {
|
||||||
clearResults();
|
for (const auto& dev : m_scanResults.m_deviceVec) {
|
||||||
|
delete dev;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user