FIX: Memory Leak with ODBC Driver Manager During ConnectLast reviewed: October 29, 1997Article ID: Q153797 |
The information in this article applies to:
SYMPTOMSWhen an ODBC application makes a certain sequence of calls to connect to an ODBC driver, a memory loss on the order of a few hundred bytes may occur due to a memory leak in the Driver Manager. The sequence that results in the memory leak is as follows:
SQLAllocEnv SQLAllocConnect SQLConnect or SQLDriverConnect SQLDisconnect SQLFreeConnect SQLFreeEnvThis leak affects only those applications that connect and disconnect frequently without ever exiting the application. For SQL Server replication users, this problem is encountered when a distribution server connects to subscription servers as an ODBC client.
WORKAROUNDAn application can share connections. If an application needs to connect and disconnect frequently, you can shut down the application periodically. For example, if an application is running as a Windows NT service, you can periodically shut down and restart the service in order to clean up the memory leak. Under Windows NT and Windows 95, each application has its own memory address space. After the application is shut down, Windows NT and Windows 95 will clean up the application's memory space, including the memory leak.
STATUSMicrosoft has confirmed this to be a problem in Microsoft Open Database Connectivity version 2.5.x. This problem has been corrected in Microsoft Open Database Connectivity version 3.0.x.
|
Additional reference words: 2.50 ODBC DM VC++ VB C++ MSVC FoxPro
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |