PDA

View Full Version : memory leak caused by RTTI in VS2005?


feel_energetic
01-25-2007, 07:35 PM
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.

dave_
01-26-2007, 02: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