Page 1 of 1

Memory leaks after a failed run from TMyConnection.connect

Posted: Mon 05 May 2008 16:58
by qmanla
How to reproduce it:

First, please make sure that there is actually no mysql server available on target ip. Next, place a TMyConnection component and a TButton on a new, clean form and run this code:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  MyConnection1.Pooling := true;
  MyConnection1.PoolingOptions.MinPoolSize := 1;
  MyConnection1.LoginPrompt := false;
  MyConnection1.Options.Charset := 'utf8';
  MyConnection1.Options.Direct := true;
  MyConnection1.Options.UseUnicode := true;
  MyConnection1.Username := 'test';
  MyConnection1.Password := 'test';
  MyConnection1.Database := 'test';
  MyConnection1.Server := '127.0.0.1';
  MyConnection1.Port := 3306;
  MyConnection1.Connect;

end;
if reportmemoryleaksonshutdown is set to true, the leaks report after form.close is going to be like this:

Image

Please help, thanks!

Posted: Wed 07 May 2008 14:01
by Dimon
Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next MyDAC build.