-
Notifications
You must be signed in to change notification settings - Fork 715
Memory leak on BLEDevice::init() and deinit() #928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm seeing similar behaviour: I'm alternating between WiFi and BLE (to make sure enough heap is available in both situations). After every BLE-Iteration the heap decreases until the ESP crashes. |
I tested with code from OP and here is result:
Not even a single byte leaking anymore. |
Sorry for the confusion: I got the same problem using the BLEDevice implementation in arduino-esp32. During my debugging/gooleing session I must have gotten confused and didn't realize this was a different repo. |
Anyone found solution for ble init / deinit leaking problem? |
I don't get it. If I go to that link I see this.
So here we are again. |
When you check that README.md is 2 years old and has not been updated. and few more people, including me, is trying to answer questions and help with issues. |
Ok, I see. Thanks for that link. I think it would be important to update this README then: And thanks for your efforts. |
Using ESP-WROOM-32U, running a simple code to simulate
init
anddeinit
of a BLEDevice.Compile settings:
Here are the logs:
The backtrace results in this:
Every single iteration of the init/deinit loop is leaking ~4k, and I could'nt find any other way to fix this. My initial problem is based on this memory leak, I think you could help me with this.
Thanks in advance
The text was updated successfully, but these errors were encountered: