|
Does anyone know if Microsoft generated a whitepaper on this topic?
Does anyone know what the solution is? (meaning, eliminate the leak
problem -- I am seeing three memory leaks from dllmodul.cpp(102)
similar to what is mentioned below)...
I am calling MFC as part of unmanaged code used by the managed code.
+--------
.... copied from October 2002 posts ...
From: Visual C++ Team (vcpp@microsoft.com)
Subject: Re: VC7++ - Detection of memory leaks, mixed DLL
(unmanaged/managed)
Newsgroups: microsoft.public.dotnet.languages.vc
Date: 2002-10-20 20:46:02 PST
Hi Bill,
This is a known issue. We are currently working on a whitepaper that
describes the issue and several possible technical solutions. I will
post a
message to this thread when the whitepaper is made available for
download.
--
Scott Currie
Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no
rights.
Visual C++ Team wrote:[color=blue]
> Hi Bill,
> We were unable to reproduce your problem. We will contact you in a
> separate email for a repro case.
>
>
> "Billw" <bfwooton@home.com> wrote in message
> news:OCfpGbzcCHA.2380@tkmsftngp11...[color=green]
>> // Sorry, mis-posted previous message
>>
>> Compile a DLL- use MFC, some cpp files w/CLR, some cpp files w/o[/color][/color]
CLR.[color=blue][color=green]
>> Include an unmanaged static var that will store unmanaged allocated
>> objects (i.e. - CStringArray which will eventually hold allocated
>> CString's). The resulting DLL is a .NET assembly and, in addition,
>> a .lib file is produced to link with unmanaged applications.
>>
>> When running an unmanaged application that uses this DLL (normal
>> unmanaged DLL 'lib' linkage) in the debugger, normal closure of[/color][/color]
the[color=blue][color=green]
>> application will cause the memory objects stored in the static var
>> to be detected and reported as memory leaks.
>>
>> Is there a way to configure the memory leak detection to NOT report
>> these objects while detecting and reporting real memory leaks?
>>
>> ========================================
>> Output window when the application is closed
>> ========================================
>> The thread 'Win32 Thread' (0x468) has exited with code 0 (0x0).
>> Detected memory leaks!
>> Dumping objects ->
>> {177} normal block at 0x002F88F0, 28 bytes long.
>> Data: <( @| > 28 10 40 7C 05 00 00 00 05 00 00 00 01 00 00 00
>> {176} normal block at 0x002F8898, 24 bytes long.
>> Data: <( @| > 28 10 40 7C 03 00 00 00 03 00 00 00 01 00 00 00
>> array_s.cpp(150) : {175} normal block at 0x002F8848, 20 bytes long.
>> Data: < v/ / / > E0 76 2F 00 A8 88 2F 00 00 89 2F 00 CD CD CD CD
>> {174} normal block at 0x002F76D0, 24 bytes long.
>> Data: <( @| > 28 10 40 7C 03 00 00 00 03 00 00 00 01 00 00 00
>> dllmodul.cpp(102) : {68} client block at 0x002F2838, subtype c0, 64
>> bytes long.
>> a CDynLinkLibrary object at $002F2838, 64 bytes long
>> {63} client block at 0x002F2608, subtype c0, 64 bytes long.
>> a CDynLinkLibrary object at $002F2608, 64 bytes long
>> Object dump complete.
>> The program '[1672] console.exe: Native' has exited with code 0
>> (0x0). ==========================================
>>
>>
>> --
>> Billw[/color][/color] |