Jump to content


memory leak caused by RTTI in VS2005?


  • You cannot reply to this topic
1 reply to this topic

#1 feel_energetic

    New Member

  • Members
  • PipPip
  • 19 posts

Posted 26 January 2007 - 03:35 AM

The crtdbg in VS2005 reports memory leak after using simple RTTI
how could this happen?

    int a = 0;

    typeid(a).name();


it outputs:

1>Detected memory leaks!
1>Dumping objects ->
1>{2242} normal block at 0x00D4DE00, 4 bytes long.
1> Data: <int > 69 6E 74 00
1>{2241} normal block at 0x00D4DDC8, 8 bytes long.
1> Data: < > 00 DE D4 00 00 00 00 00
1>Object dump complete.

#2 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 26 January 2007 - 10:10 AM

perhaps its an old bug thats come back: http://support.microsoft.com/kb/140670
Try the example on that page (you need to remove the .h from iostream.h), then get in touch with MS
It certainly doesnt happen in .net 2003





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users