Memory leak in driver?

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
diwic
Posts: 3
Joined: Wed 18 Jul 2007 13:27

Memory leak in driver?

Post by diwic » Wed 18 Jul 2007 13:42

Hello,

I think there is a memory leak in the dbexpsda30.dll driver. The info to back that up is:

After one day with the crlab driver (i e, 10 000 - 30 000 questions to the db), our application eats approx 65 MB of memory and 60 MB of VM according to the task manager, and it keeps rising. If we switch driver to the Borland one, the application allocates approx 20 MB of memory and 20 MB of VM regardles of the time run.

I have also monitored GetHeapStatus, but it is not rising. The total memory allocated (HeapStatus.TotalAddrSpace) is approx 5 MB regardless of driver.

This is the relevant code section:

Code: Select all

    // Borland driver
(*    Result.DriverName := 'MSSQL';
    Result.LibraryName := 'dbxmss30.dll'; // Delphi 2006
    Result.VendorLib := 'oledb';
    Result.GetDriverFunc := 'getSQLDriverMSSQL';    *)

    // Corelab driver
    Result.DriverName := 'SQLServer';
    Result.LibraryName := 'dbexpsda30.dll';
    Result.VendorLib := 'sqloledb.dll';
    Result.GetDriverFunc := 'getSQLDriverSQLServer';
This was detected with:

File version of dbexpsda30.dll: 3.10.8.0, according to readme.txt this is 3.20.
Delphi 2006 Update pack 2.
SQLOleDB.DLL is version 2000.86.1830.0, running against a SQL Server 2005 database.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 20 Jul 2007 08:55

I could not reproduce the problem.
Please send me a complete small sample at evgeniyD*crlab*com to demonstrate it, including script to create and fill table.
What version of SQL Server do you use?

diwic
Posts: 3
Joined: Wed 18 Jul 2007 13:27

Post by diwic » Fri 20 Jul 2007 15:40

A mail has now been sent to you, I hope it will help you to solve the problem.

SQL Server Version is 9.0.1399.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 23 Jul 2007 13:03

Thank you for your sample. It looks like this problem has been fixed in the latest build of DbxSda 4. Please try to download and test it.

diwic
Posts: 3
Joined: Wed 18 Jul 2007 13:27

Post by diwic » Thu 26 Jul 2007 14:23

I can confirm that the problem is fixed in the latest (DBX4) version.

Post Reply