-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
enhancementNew feature or requestNew feature or request
Description
In LoRa_E22.cpp a buffer is allocated in each call
...
ResponseStructContainer LoRa_E22::receiveMessageComplete(const uint8_t size, bool rssiEnabled){
ResponseStructContainer rc;
rc.data = malloc(size);
...
However, in all of the samples, you appear not to release the memory, for example esp32_e22_04_SendFixedTransmission.ino:
...
if (e22ttl.available()>1) {
// read the String message
#ifdef ENABLE_RSSI
ResponseContainer rc = e22ttl.receiveMessageRSSI();
#else
ResponseContainer rc = e22ttl.receiveMessage();
#endif
...
Isn't rc.close() required to release the memory? Also, is there a way to avoid malloc() every time you receive a message to avoid fragmentation?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request