Closed gkecskes78 closed 8 months ago
It took a while to track this down, but it appears that the reason for the leak is that CharacteristicBuffer.deinit()
is not being called when the CharacteristicBuffer
used for one direction of the UARTService
is no longer in use. I have a fix for this in the adafruit_ble
library.
It's possible we may be able to detect in _bleio
when to call deinit()
, but I am not at all sure. If we could, we might not need that exposed routine.
I'll discuss this with @tannewt, and maybe move the issue to the library.
The leak is due to _bleio.CharacteristicBuffer.deinit()
. Not being called. This is best done in the library when a connection is closed.
CircuitPython version
Code/REPL
Behavior
Description
Hi guys,
I created this issue based on this forum entry. Basically I got in memory allocation trouble after repeated BLE reconnection and subsequent UARTService activation.
Additional information
No response