mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
JsonArray::remove() and JsonObject::remove() now release the memory of strings
This commit is contained in:
@@ -11,13 +11,15 @@ class StringMover {
|
||||
public:
|
||||
class StringBuilder {
|
||||
public:
|
||||
typedef ZeroTerminatedRamStringConst StringType;
|
||||
|
||||
StringBuilder(TChar** ptr) : _writePtr(ptr), _startPtr(*ptr) {}
|
||||
|
||||
void append(char c) {
|
||||
*(*_writePtr)++ = TChar(c);
|
||||
}
|
||||
|
||||
StringInMemoryPool complete() const {
|
||||
StringType complete() const {
|
||||
*(*_writePtr)++ = 0;
|
||||
return reinterpret_cast<const char*>(_startPtr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user