Why does MS Dev Studio show a memory leak when I terminate my application that is running in debug mode?

Why does MS Dev Studio show a memory leak when I terminate my application that is running in debug mode?

book

Article ID: KB0092066

calendar_today

Updated On:

Products Versions
TIBCO Adapter SDK -
Not Applicable -

Description

Resolution:
This is not an SDK issue; it is a known Microsoft RTL issue.  We've seen MicroSoft Dev Studio reported memory leaks in debug mode that were not caused by SDK. Rather, the "reported leak" stems from the fact that Microsoft Debug Run-Time Library (MSVCRTD.DLL and MFC42D.DLL) is different from their Release version of Run-Time Library (MSVCRT.DLL and MFC42.DLL).

1. Your application is built in Debug, which loads in MSVCRTD.DLL and MFC42D.DLL (and our maverickd.dll).

2. maverickd.dll has dependency on rv.dll rvcm.dll rvcmq.dll, all of which are RV libraries built in Release, and loads in MSVCRT.DLL

Leading to:
3. While running in MSDEV debugger, memory allocated by Release RTL MSVCRT.DLL may be de-allocated by Debug RTL MSVCRTD.DLL. Due to differences in these two RTLs, Memory Leak is reported by MSDEV.

  If you build and run your application in Release mode and try running it in the debugger again, you will see that there are no leaks reported by MSDEV.

  If you use the "Dependency Walker" provided with MSDEV on the debug build of your application, you will see the dependency that is described in (1) and (2).

Issue/Introduction

Why does MS Dev Studio show a memory leak when I terminate my application that is running in debug mode?

Environment

Product: TIBCO Adapter SDK Version: 4.1.3 OS: Windows 2000, Windows NT 4.0 --------------------