From 50ff0805a4d19ce25a4af455ebfea06825d921d6 Mon Sep 17 00:00:00 2001 From: suwatchai Date: Fri, 6 May 2022 15:57:57 +0700 Subject: [PATCH] Important fix for memory leaks issue. --- library.json | 2 +- library.properties | 2 +- src/FirebaseJson.cpp | 4 ++-- src/FirebaseJson.h | 7 +++++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/library.json b/library.json index 61ea10b..0d9a811 100644 --- a/library.json +++ b/library.json @@ -8,5 +8,5 @@ }, "frameworks": "arduino", "platforms": ["espressif8266", "espressif32","teensy", "atmelsam","ststm32","atmelavr","atmelmegaavr","raspberrypi"], - "version": "2.7.0" + "version": "3.0.0" } \ No newline at end of file diff --git a/library.properties b/library.properties index 468de91..98d4495 100644 --- a/library.properties +++ b/library.properties @@ -1,6 +1,6 @@ name=FirebaseJson -version=2.7.0 +version=3.0.0 author=Mobizt diff --git a/src/FirebaseJson.cpp b/src/FirebaseJson.cpp index 58754d6..eeeafc4 100644 --- a/src/FirebaseJson.cpp +++ b/src/FirebaseJson.cpp @@ -1,9 +1,9 @@ /* - * FirebaseJson, version 2.7.0 + * FirebaseJson, version 3.0.0 * * The Easiest Arduino library to parse, create and edit JSON object using a relative path. * - * Created May 4, 2022 + * Created May 6, 2022 * * Features * - Using path to access node element in search style e.g. json.get(result,"a/b/c") diff --git a/src/FirebaseJson.h b/src/FirebaseJson.h index bf83db0..beb45fc 100644 --- a/src/FirebaseJson.h +++ b/src/FirebaseJson.h @@ -1,9 +1,9 @@ /* - * FirebaseJson, version 2.7.0 + * FirebaseJson, version 3.0.0 * * The Easiest Arduino library to parse, create and edit JSON object using a relative path. * - * Created May 4, 2022 + * Created May 6, 2022 * * Features * - Using path to access node element in search style e.g. json.get(result,"a/b/c") @@ -2421,6 +2421,7 @@ class FirebaseJson : public FirebaseJsonBase { uint32_t addr = 0; dataHandler(getStr(key, addr), value, fb_json_func_type_add); + delAddr(addr); return *this; } @@ -2429,6 +2430,7 @@ class FirebaseJson : public FirebaseJsonBase { uint32_t addr = 0; dataHandler(getStr(key, addr), value, fb_json_func_type_add); + delAddr(addr); return *this; } @@ -2437,6 +2439,7 @@ class FirebaseJson : public FirebaseJsonBase { uint32_t addr = 0; dataHandler(getStr(key, addr), value, fb_json_func_type_add); + delAddr(addr); return *this; }