memory leak with myquery.execute

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
philippehenri
Posts: 1
Joined: Fri 13 Jan 2012 17:02

memory leak with myquery.execute

Post by philippehenri » Fri 13 Jan 2012 17:15

Hi

It seems that there is a memory leak of 54 bytes with myquery.execute (using an update statement).

I am using mdac 610 with delphi 2010:

myquery := TMyQuery.Create(nil);
myconnection:=tmyconnection.Create(nil);

myconnection.LoginPrompt := false;
myconnection.Server := 'localhost';
myconnection.Port := 3306;
myconnection.Username := 'username';
myconnection.Password := 'password';
myconnection.Database := 'test';

myconnection.Connect;

myquery.Connection := myconnection;

myquery.sql.Add('update company set excluded=112 where id=1');

myquery.execute;

myquery.Free;
myconnection.Free;

Can you help please?
thanks
philippe

AndreyZ

Post by AndreyZ » Mon 16 Jan 2012 15:31

Hello,

I cannot reproduce the problem. To detect memory leaks, I used the functionality of the RAD Studio 2010 memory manager. I set the ReportMemoryLeaksOnShutdown global variable to True and there were no memory leak reports after my application was closed. For more information about the ReportMemoryLeaksOnShutdown global variable, please refer to the following article: http://docwiki.embarcadero.com/VCL/en/S ... OnShutdown
Also, I used EurekaLog - it is a tool for detecting all exceptions and memory leaks. EurekaLog didn't show any memory leaks as well.
Please try creating a small sample to demonstrate this problem and send it to andreyz*devart*com , including a script to create and fill a table. Also please specify the following:
- the exact version of MyDAC. You can learn it from the About sheet of TMyConnection Editor;
- the exact version of MySQL server. You can learn it from the Info sheet of TMyConnection Editor.

Post Reply