after the monitor starts, the memory usage starts to grow. added in uTelegramAPI module
function TTelegramAPI.GetUpdates
such a line
pArrJSON.Destroy;
try
FResult := _GET(GetURL('/getUpdates'));
pArrJSON := ((TJSONObject.ParseJSONValue(FResult) as TJSONObject)
.GetValue('result') as TJSONArray);
if pArrJSON.Count <= 0 then Exit;
for I := 0 to Pred(pArrJSON.Count) do
AValue.Add(TJSON.JsonToObject<TChatMessageDTO>(pArrJSON.Items[I].ToJSON));
pArrJSON.Destroy; //-----new line-----
except
on E: Exception do
begin
if Assigned(FProcErrorException) then
FProcErrorException(E);
end;
end;