Skip to content

Commit 758b0bd

Browse files
fabianomsdevyte
authored andcommitted
Minimizing code redundancy (#4695)
String's destructor does the same as the 'invalidate' method.
1 parent 41a6470 commit 758b0bd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cores/esp8266/WString.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,7 @@ String::String(double value, unsigned char decimalPlaces) {
113113
}
114114

115115
String::~String() {
116-
if(buffer) {
117-
free(buffer);
118-
}
119-
init();
116+
invalidate();
120117
}
121118

122119
// /*********************************************/

0 commit comments

Comments
 (0)