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.
Diff: source/utils/Payload.cpp
- Revision:
- 236:2a73f3a97452
- Parent:
- 132:51056160fa4a
--- a/source/utils/Payload.cpp Thu Jun 09 17:15:02 2016 +0200
+++ b/source/utils/Payload.cpp Thu Jun 09 17:16:36 2016 +0200
@@ -98,4 +98,21 @@
serializedAdData[i+1] = data[i];
}
return serializedAdData;
-}
+}
+
+Payload::~Payload() {
+ int i = 0;
+
+ if(payload) {
+ while(i<payloadUnitCount) {
+ if(payload->data) {
+ delete[] payload->data;
+ payload->data = NULL;
+ }
+ }
+ delete[] payload;
+ payload = NULL;
+ }
+
+}
+