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.
Dependents: Program3_BLEHeartRate Program3_BLEHeartRate
Fork of X_NUCLEO_IDB0XA1 by
Diff: x-nucleo-idb0xa1/utils/Payload.h
- Revision:
- 242:058b2e731adc
- Parent:
- 180:b2a22cb6c87c
- Parent:
- 236:2a73f3a97452
- Child:
- 252:0c2cb16a7166
--- a/x-nucleo-idb0xa1/utils/Payload.h Fri Mar 18 12:10:20 2016 +0100
+++ b/x-nucleo-idb0xa1/utils/Payload.h Mon Jun 20 14:59:06 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__
