Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC memory leak at each new connection

Status
Not open for further replies.

PROPAR

Programmer
Oct 25, 2001
51
FR
I'm using SQL6.5 and ODBC32 and VisualC++5.0

I build a connection handle using
SQLAllocHandle with (SQL_HANDLE_ENV, SQL_HANDLE_DBC) and then SQLConnect.

When the connection fails (no datasource), I free resources using SQLFreeHandle with (SQL_HANDLE_DBC, SQL_HANDLE_ENV).
Then I go to step 1 and try again, allocating new handles.

Purify then declares memory leaks at each SQLFreeHandle(SQL_HANDLE_ENV, &hEnv) and SQLAllocHandle(SQL_HANDLE_ENV, &hEnv) over hEnv pointer.

Microsoft declares memory leaks corrected in ODBC 3.0 drivers, however SQL ODBC drivers 2.65.0252 and 3.0.xxxx (MDAC 2.1) are still leaking.

Is Microsoft lying ? Is there a MDAC correcting leaks or is my connection building somehow wrong ?

Thank you very much for any information about the memory leak issur in ODBC drivers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top