mirror of
https://github.com/Genaker/LoraSA.git
synced 2026-08-02 06:52:52 +02:00
Fixup message destructor
This commit is contained in:
+15
-2
@@ -1,4 +1,3 @@
|
||||
#ifdef SERIAL_OUT
|
||||
#include "comms.h"
|
||||
#include <config.h>
|
||||
|
||||
@@ -340,4 +339,18 @@ String _wrap_str(String v)
|
||||
String r = String(v.length()) + "\n" + v;
|
||||
return "WRAP " + String(crc16(r, 0), 16) + " " + r;
|
||||
}
|
||||
#endif
|
||||
|
||||
Message::~Message()
|
||||
{
|
||||
if (type == SCAN_RESULT)
|
||||
{
|
||||
if (payload.dump.sz > 0)
|
||||
{
|
||||
delete[] payload.dump.freqs_khz;
|
||||
delete[] payload.dump.rssis;
|
||||
payload.dump.sz = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user