diff --git a/cores/esp8266/WString.cpp b/cores/esp8266/WString.cpp index 6f2134e86f..c81b594d6c 100644 --- a/cores/esp8266/WString.cpp +++ b/cores/esp8266/WString.cpp @@ -113,10 +113,7 @@ String::String(double value, unsigned char decimalPlaces) { } String::~String() { - if(buffer) { - free(buffer); - } - init(); + invalidate(); } // /*********************************************/