未验证 提交 e831680a 编写于 作者: U ushiboy 提交者: GitHub

Fixed a memory leak in BLE (issue #4753) (#4761)

* Fixed crash on delete after disconnect

* Fixed memory leak when getting characteristics

* Removed guard
Co-authored-by: Nushiboy <ushiboy.dev@gmail.com>
上级 d9648738
......@@ -60,6 +60,7 @@ BLEClient::~BLEClient() {
delete myPair.second;
}
m_servicesMap.clear();
m_servicesMapByInstID.clear();
} // ~BLEClient
......
......@@ -52,6 +52,7 @@ BLERemoteCharacteristic::BLERemoteCharacteristic(
*/
BLERemoteCharacteristic::~BLERemoteCharacteristic() {
removeDescriptors(); // Release resources for any descriptor information we may have allocated.
free(m_rawData);
} // ~BLERemoteCharacteristic
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册