The information in this article applies to:
SYMPTOMSAn MFC ODBC application dynamically linked to an MFC DLL and connecting to an Oracle data source from a Windows 95 machine using the Intersolve 32-bit ODBC driver for Oracle, may display the following error messages in the output window of the debugger (with MFC tracing enabled) when exiting: Object addresses and thread ID may be different. The same error messages may also appear when using DAO to access a linked table via an ODBC driver in an Oracle data source. CAUSEWhen the application connects to the data source, a thread is created that terminates when the application terminates. This causes DllMain in the MFC DLL to be called with DLL_PROCESS_DETACH from the secondary thread and causes the memory detection code to be executed before the memory is actually freed. RESOLUTIONThe error message refers to memory that is actually being freed, not a memory leak. The message can be safely ignored. This can be verified by setting a breakpoint in _AFX_THREAD_STATE destructor (AFXSTATE.CPP) and stepping through the code. In one of the cases, you should see that the following line is executed for the memory at the address that is supposed to be leaking:
STATUSThis behavior is by design. However, the design was changed in Visual C++ version 4.2, so this is no longer a problem. MORE INFORMATION
To reproduce the problem, set up an Oracle data source on a Windows 95
machine with an Intersolve 32-bit ODBC driver and the proper SQL*Net
components. Generate a default ODBC application ( SDI, "Database support,
no file support" ). Add the following code to the InitInstance() function:
Q140498 INF: Using the Visigenic Oracle Driver on WinNT & Win95 Additional query words: 4.00 4.10
Keywords : kberrmsg kbnokeyword kbDatabase kbMFC kbODBC kbVC |
Last Reviewed: August 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |