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;
delphi 释放内存
最新推荐文章于 2024-06-05 08:13:30 发布