Memory leaks after a failed run from TMyConnection.connect
Posted: Mon 05 May 2008 16:58
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:
if reportmemoryleaksonshutdown is set to true, the leaks report after form.close is going to be like this:

Please help, thanks!
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;

Please help, thanks!