[C++-sig] Memory Leak in MFC/C++ based Python Extended/Embedded code.

Stefan Seefeld seefeld at sympatico.ca
Tue Jan 8 03:13:19 CET 2008


Dan Trowbridge wrote:

> The minimal code STILL reports a memory error.  It looks like the memory
> leak had nothing to do with my code.
> 
> Anybody have any ideas how to fix this?

It isn't clear that there is actually anything to fix. Reporting memory
errors isn't easy, and most tools I have used in the past are erroneous.
For example, I once used a memory leak checker with MSVC that generated
its table even before global objects of my application had been
destroyed. It obviously generated wrong results, and thus was of little use.

I'm not sure whether you can assist your leak detector by forcing a gc
cleanup in python.

HTH,
		Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...



More information about the Cplusplus-sig mailing list