#1 2018-09-05 08:28:38

delphi_911
Member
Registered: 2018-06-11
Posts: 31

Memory leaks when access remotely syndb[connect error]

Hi, is it a bug or my mistake?  Thanks!

1、 create TSQLDBWinHTTPConnectionProperties to connect romote db
 

  try
    Props := TSQLDBWinHTTPConnectionProperties.Create(s1, s2, s3, s4); //connect error hear
  finally
    Props.Free;
  end;
 

2、When program exit, An unexpected memory lead has occurred.

13-20 bytes:AnsiString * 4
21-28 bytes:AnsiString * 2
45-52 bytes:AnsiString * 1
285-300 bytes:TSQLDBWinHTTPConnectionProperties * 1

3、TSQLDBWinHTTPConnectionProperties or TSQLDBSocketConnectionProperties or TSQLDBWinINetConnectionProperties all have the same problem.

Offline

#2 2018-09-05 09:38:14

delphi_911
Member
Registered: 2018-06-11
Posts: 31

Re: Memory leaks when access remotely syndb[connect error]

Form OnCreate even:

ReportMemoryLeaksOnShutdown := True;

Last edited by delphi_911 (2018-09-05 14:29:28)

Offline

#3 2018-09-10 08:43:02

delphi_911
Member
Registered: 2018-06-11
Posts: 31

Re: Memory leaks when access remotely syndb[connect error]

Does anyone found this problem?

Offline

#4 2018-09-13 03:40:26

delphi_911
Member
Registered: 2018-06-11
Posts: 31

Re: Memory leaks when access remotely syndb[connect error]

All code:

var
  Form1: TForm1;
  Props: TSQLDBWinHTTPConnectionProperties;

implementation

{$R *.dfm}

procedure TForm1.btn1Click(Sender: TObject);
begin
  Props := TSQLDBWinHTTPConnectionProperties.Create('127.0.0.1', 'test', 'test', 'test'); //connect error hear
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  ReportMemoryLeaksOnShutdown := True;
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
  Props.Free;
end;

Offline

#5 2018-09-13 06:59:44

snakegao
Member
Registered: 2017-06-22
Posts: 21

Re: Memory leaks when access remotely syndb[connect error]

'127.0.0.1' -----port?

Offline

Board footer

Powered by FluxBB