Quantcast
Channel: Visual Leak Detector for Visual C++ 2008-2015
Viewing all articles
Browse latest Browse all 704

Created Unassigned: report typeid().name() memory leak when link use static CRT [10554]

$
0
0
When link use static CRT, reported typeid(..).name() in memory leak. But when link with DLL CRT, there has no memory leak report.

VS2012 UPDATE 4

Any idea?

Sample code as follow:

#include "stdafx.h"
#include <iostream>
#include <vld.h>

class Base
{
Base() {}
~Base() {}
};

int _tmain(int argc, _TCHAR* argv[])
{
std::cout << typeid(Base).name() << std::endl;

return 0;
}

Debug Output:

Visual Leak Detector Version 2.4 installed.
'TestTypeID.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Cannot find or open the PDB file.
'TestTypeID.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Cannot find or open the PDB file.
WARNING: Visual Leak Detector detected memory leaks!
---------- Block 125 at 0x0061FCB8: 4272663467 bytes ----------
Call Stack:
0x7765E046 (File and line number not available): ntdll.dll!RtlAllocateHeap
f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\typname.cpp (138): TestTypeID.exe!type_info::_Name_base + 0xC bytes
f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\typinfo.cpp (28): TestTypeID.exe!type_info::name + 0xD bytes
c:\someworks\myworks\exercises\testversion\testtypeid\testtypeid.cpp (16): TestTypeID.exe!wmain + 0x14 bytes
f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (241): TestTypeID.exe!__tmainCRTStartup + 0x19 bytes
f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (164): TestTypeID.exe!wmainCRTStartup
0x76D7336A (File and line number not available): kernel32.dll!BaseThreadInitThunk + 0x12 bytes
0x77669F72 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x63 bytes
0x77669F45 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x36 bytes
Data:
CB 75 B9 39 EB 62 00 00 28 12 61 00 C8 FA 61 00 .u.9.b.. (.a...a.
EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE ........ ........
EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE ........ ........
EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE ........ ........
EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE ........ ........
EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE ........ ........
EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE ........ ........
EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE ........ ........
EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE ........ ........
EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE ........ ........
EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE ........ ........
EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE ........ ........
EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE ........ ........
EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE ........ ........
EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE ........ ........
EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE ........ ........


Visual Leak Detector detected 1 memory leak (16925 bytes).
Largest number used: 27614 bytes.
Total allocations: 44453 bytes.
Visual Leak Detector is now exiting.


Viewing all articles
Browse latest Browse all 704

Trending Articles