当前位置:网站首页>Delphi free memory

Delphi free memory

2022-07-05 03:10:00 Listest

procedure Tfrmmain.ResetHttpClient;
begin
  try
    if Assigned(httpClient) then
    begin
      FreeAndNil(httpClient);
    end;
    httpClient := TIdHTTP.Create(nil);
    httpClient.HandleRedirects := True;
    httpClient.Request.AcceptEncoding := '';
    httpClient.ReadTimeout:= 30000;
    httpClient.ConnectTimeout:= 30000;
  except
  end;
end;

procedure Tfrmmain.ResetstrList;
begin
 try
    if Assigned(strList) then
    begin
      FreeAndNil(strList);
    end;
    strList := TStringList.Create;
    strList.Clear;
 except

 end;

end;

原网站

版权声明
本文为[Listest]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140811269664.html