Skip to content

Commit

Permalink
Important fix for memory leaks issue in FirebaseJson.
Browse files Browse the repository at this point in the history
  • Loading branch information
mobizt committed May 7, 2022
1 parent 89d8166 commit 0b3b676
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 3,574 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Arduino Google Sheet Client Library for ESP8266 and ESP32


Arduino Google Sheet Client Library for ESP8266 and ESP32 v1.0.4.
Arduino Google Sheet Client Library for ESP8266 and ESP32.

This library allows devices to authenticate and communicate with Google Sheet APIs using the Service Account.

Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ESP-Google-Sheet-Client",
"version": "1.0.4",
"version": "1.1.0",
"keywords": "communication, REST, esp32, esp8266, arduino",
"description": "Arduino Google Sheet REST client library for ESP8266 and ESP32. This library allows devices to communicate with Google Sheet API to read, edit and delete the spreadsheets",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name=ESP-Google-Sheet-Client

version=1.0.4
version=1.1.0

author=Mobizt

Expand Down
9 changes: 7 additions & 2 deletions src/ESP_Google_Sheet_Client.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Google Sheet Client, ESP_Google_Sheet_Client.cpp v1.0.4
* Google Sheet Client, ESP_Google_Sheet_Client.cpp v1.1.0
*
* This library supports Espressif ESP8266 and ESP32 MCUs
*
* Created April 23, 2022
* Created May 7, 2022
*
* The MIT License (MIT)
* Copyright (c) 2022 K. Suwatchai (Mobizt)
Expand Down Expand Up @@ -224,6 +224,7 @@ bool GSheetClass::processRequest(FirebaseJson *response, MB_String &req, int &ht
config.signer.result = new FirebaseJsonData();
int ret = config.signer.wcs->send(req.c_str());
req.clear();
config.signer.reuseSession = true;

if (ret == 0)
{
Expand All @@ -238,9 +239,13 @@ bool GSheetClass::processRequest(FirebaseJson *response, MB_String &req, int &ht
}
}

Serial.println(ESP.getFreeHeap());

delete config.signer.json;
delete config.signer.result;

config.signer.reuseSession = false;

return ret;
}

Expand Down
6 changes: 3 additions & 3 deletions src/ESP_Google_Sheet_Client.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef ESP_GOOGLE_SHEET_CLIENT_VERSION
#define ESP_GOOGLE_SHEET_CLIENT_VERSION "1.0.4"
#define ESP_GOOGLE_SHEET_CLIENT_VERSION "1.1.0"
#endif

/**
* Google Sheet Client, ESP_Google_Sheet_Client.h v1.0.4
* Google Sheet Client, ESP_Google_Sheet_Client.h v1.1.0
*
* This library supports Espressif ESP8266 and ESP32 MCUs
*
* Created April 23, 2022
* Created May 7, 2022
*
* The MIT License (MIT)
* Copyright (c) 2022 K. Suwatchai (Mobizt)
Expand Down
Loading

0 comments on commit 0b3b676

Please sign in to comment.