I have this leak in Indy 10.5.7 (under Delphi 7).
5 - 12 bytes: TIdThreadSafeInteger x 1
21 - 36 bytes: TIdCriticalSection x 2
I am using Indy as follows:
function getWeb(a,b:Integer):Integer;
var url: string;
H: TIdHttp;
SS: TStringStream;
begin
url := 'http://blabla';
H := TIdHttp.Create(nil);
try
SS := TStringStream.Create('');
try
H.Get(url, SS);
Result := StrToInt(SS.DataString);
FINALLY
SS.Free;
END;
finally H.Free;
end;
The leak itself does not bother me, because it disconnects when the application is turned off. This causes my melon to explode - this is an error message that I see every time I close the application.
Why does this leak appear?
I checked the Indy website, but that hardly makes sense. In any case, it seems that this error cannot be fixed: the latest version of Indy cannot be compiled with Delphi 7. The only solution could be Indy 9. Update: it looks like v10.203 on the website is actually called v10.2.3 .
source
share