Re: Managed VC++ crashing in debug build caused memory leaks

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"PL" <paul@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:TKadnc1jZPjym8fYnZ2dnUVZ8tSdnZ2d@xxxxxxxxx
By the way, this is using .NET framework 1.1 - we can't upgrade to 2 yet!

PL wrote:

Hi everyone,
I was surprised to see memory leaks in our application when it crashed
today. Basically, the code is written in C#, but with c# and C++ DLLS;
its the latter (managed extensions) that cause the memory leaks (the new
operator in crtdbg.h). Does the garbage collector not work in debug build
for VC++?

Remember that only __gc objects are garbage collected, and the new operator
can also allocate from the native heap. This is distinguished a lot better
in C++/CLI, but you said you're stuck with .NET 1.1 :(


TIA

Paul


--
----
Home: http://www.paullee.com
Woes: http://www.dr_paul_lee.btinternet.co.uk/auto.shtml


.



Relevant Pages

  • Re: netbeans or java ?
    ... > thought Java programs didn't need to worry about memory leaks because of the ... > garbage collector. ... > Is the JVM at fault for the memory leaks? ... PGP Key available from your friendly local key server ...
    (comp.lang.java.programmer)
  • Re: interface programming
    ... ICar pGenericCar = carFactory.createCar; ... Without worrying about memory leaks. ... delete this heap object since C++ interfaces have no ctor or dtor? ... the garbage collector will work exactly yhe same as in C#. ...
    (microsoft.public.vc.language)
  • Re: Memory issues
    ... with observe_malloc_free.pl in mail bottom. ... this result of memory leaks: ... 10 Mbytes data are not freed. ... I don't know much about the perl garbage collector, ...
    (comp.lang.perl.misc)
  • Re: Managed VC++ crashing in debug build caused memory leaks
    ... Ben Voigt wrote: ... I was surprised to see memory leaks in our application when it crashed ... Does the garbage collector not work in debug ... the memory leaks are an artefact of compiling in debug mode only? ...
    (microsoft.public.dotnet.languages.vc)
  • Re: "new"
    ... have memory leaks. ... The Garbage Collector will release any memory that is no ... All this code does is allocate an object, ...
    (microsoft.public.dotnet.languages.csharp)