Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-os-example-ble-Advertising
Diff: x-nucleo-idb0xa1/utils/Payload.h
- Revision:
- 236:2a73f3a97452
- Parent:
- 175:925e455f5e45
- Child:
- 242:058b2e731adc
- Child:
- 251:86df2c289e7c
--- a/x-nucleo-idb0xa1/utils/Payload.h Thu Jun 09 17:15:02 2016 +0200
+++ b/x-nucleo-idb0xa1/utils/Payload.h Thu Jun 09 17:16:36 2016 +0200
@@ -67,6 +67,7 @@
public:
Payload(const uint8_t *tokenString, uint8_t string_ength);
Payload();
+ ~Payload();
uint8_t getPayloadUnitCount();
uint8_t getIDAtIndex(int index);
@@ -180,7 +181,11 @@
int getPayloadUnitCount() { return payloadUnitCount; }
-
+ ~PayloadPtr() {
+ if(unit) delete[] unit;
+
+ unit = NULL;
+ }
};
#endif // __PAYLOAD_H__