Closed andrea-magni closed 2 years ago
A memory leak of TPair value occurs if WriteStringValue is called twice (or more) with the same key.
To Reproduce
var LObj: TJSONObject; begin LObj := TJSONObject.Create; try LObj.WriteStringValue('Name1', 'Value 1'); LObj.WriteStringValue('Name2', 'Value 2'); LObj.WriteStringValue('Name3', 'Value 3'); LObj.WriteStringValue('Name1', 'Value 4'); // causa memory leak! finally FreeAndNil(LObj); end; end;
Thanks to @Brov84 for pointing this out.
Thank you @andrea-magni
A memory leak of TPair value occurs if WriteStringValue is called twice (or more) with the same key.
To Reproduce
Thanks to @Brov84 for pointing this out.