Re: static object destructor not getting called

Tech-Archive recommends: Fix windows errors by optimizing your registry



The memory leak report comes out before static objects are destructed.
joe

On 20 May 2007 21:12:50 -0700, Chimanrao <chimanrao@xxxxxxxxx> wrote:

hi

I have a static object in a file.
For some reasons its destructor is not getting called,
this object is supposed to free up the memory, and because of the
destructor not getting called , visual studio reports all of them as
memory leaks.

I am using VS 2005. Any suggestions?

Regards
Chimanrao
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: CList Concept
    ... pointer instead of a list of object. ... called automatically by the list class destructor. ... CObject myObject = new CObject; ... if I do it this way, will I get memory leak? ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: CList Concept
    ... there is a bunch of predefined collection classes for standard ... called automatically by the list class destructor. ... CObject myObject = new CObject; ... if I do it this way, will I get memory leak? ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: dlclose() causing segmentation fault on exit from main()
    ... Try running this trough valgrind with a libc with debug... ... > seems what's happening is that the DSO has registered destructor calls ... > From what I can gather, if I avoid all function-scoped static objects ...
    (comp.os.linux.development.apps)
  • Re: Delegated Interface
    ... >> destructor is no longer called and i get a memory leak. ... >> you have an explanation for that behaviour? ... Or for a quick and dirty approximation of MemProof, ...
    (comp.lang.pascal.delphi.misc)
  • eMbedded C++: global object does not get constructor or destructor called
    ... I'm having some difficulties with global or static objects in eMbedded ... It seems global objects do not get their constructors and ... printf("Test constructor called\n"); ... printf("Test destructor called\n"); ...
    (microsoft.public.vc.language)