I linked MFC/C++ lib to my C based console application (http://www.codeproject.com/Messages/3299455/Re-Linking-MFC-Cplusplus-code-via-lib-wrapper-into.aspx).
Without invoking any functions from that lib just running the console and returning from main immediatly after calling to _CrtDumpMemoryLeaks() reveals many small mem leaks.
What are they?
Dumping objects ->
{377} client block at 0x00378CF8, subtype c0, 64 bytes long.
a CDynLinkLibrary object at $00378CF8, 64 bytes long
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {372} normal block at 0x00378B68, 22 bytes long.
Data: <<N ` > 3C 4E 10 60 05 00 00 00 05 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {371} normal block at 0x00378B10, 22 bytes long.
Data: <<N ` > 3C 4E 10 60 05 00 00 00 05 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {370} normal block at 0x00378AB0, 34 bytes long.
Data: <<N ` > 3C 4E 10 60 11 00 00 00 11 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {369} normal block at 0x00378A58, 28 bytes long.
Data: <<N ` > 3C 4E 10 60 0B 00 00 00 0B 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {368} normal block at 0x00378A00, 24 bytes long.
Data: <<N ` > 3C 4E 10 60 07 00 00 00 07 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {367} normal block at 0x003789A8, 22 bytes long.
Data: <<N ` > 3C 4E 10 60 05 00 00 00 05 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {366} normal block at 0x00378948, 31 bytes long.
Data: <<N ` > 3C 4E 10 60 0E 00 00 00 0E 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {365} normal block at 0x003788E8, 32 bytes long.
Data: <<N ` > 3C 4E 10 60 0F 00 00 00 0F 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {364} normal block at 0x00378888, 29 bytes long.
Data: <<N ` > 3C 4E 10 60 0C 00 00 00 0C 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {363} normal block at 0x00377AC8, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {362} normal block at 0x00377A70, 22 bytes long.
Data: <<N ` > 3C 4E 10 60 05 00 00 00 05 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {361} normal block at 0x00377A10, 33 bytes long.
Data: <<N ` > 3C 4E 10 60 10 00 00 00 10 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {360} normal block at 0x003779C0, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {359} normal block at 0x00377970, 20 bytes long.
Data: <<N ` > 3C 4E 10 60 03 00 00 00 03 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {358} normal block at 0x00377920, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {356} normal block at 0x003783F8, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {355} normal block at 0x003783A8, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {354} normal block at 0x00378350, 28 bytes long.
Data: <<N ` > 3C 4E 10 60 0B 00 00 00 0B 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {353} normal block at 0x00378300, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {352} normal block at 0x003782A0, 30 bytes long.
Data: <<N ` > 3C 4E 10 60 0D 00 00 00 0D 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {351} normal block at 0x00378248, 27 bytes long.
Data: <<N ` > 3C 4E 10 60 0A 00 00 00 0A 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {350} normal block at 0x003781F8, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {349} normal block at 0x003781A8, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {348} normal block at 0x00378150, 27 bytes long.
Data: <<N ` > 3C 4E 10 60 0A 00 00 00 0A 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {347} normal block at 0x00378100, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {346} normal block at 0x003780B0, 20 bytes long.
Data: <<N ` > 3C 4E 10 60 03 00 00 00 03 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {345} normal block at 0x00378060, 20 bytes long.
Data: <<N ` > 3C 4E 10 60 03 00 00 00 03 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {344} normal block at 0x00378008, 26 bytes long.
Data: <<N ` > 3C 4E 10 60 09 00 00 00 09 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {343} normal block at 0x00377FB8, 20 bytes long.
Data: <<N ` > 3C 4E 10 60 03 00 00 00 03 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {342} normal block at 0x00377F68, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {341} normal block at 0x00377F18, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {340} normal block at 0x00377EC8, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {339} normal block at 0x00377E78, 20 bytes long.
Data: <<N ` > 3C 4E 10 60 03 00 00 00 03 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {338} normal block at 0x00377E28, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {337} normal block at 0x00377DD8, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {336} normal block at 0x00377D88, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {335} normal block at 0x00377D38, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {334} normal block at 0x00377CD0, 38 bytes long.
Data: <<N ` > 3C 4E 10 60 15 00 00 00 15 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {333} normal block at 0x00377C70, 31 bytes long.
Data: <<N ` > 3C 4E 10 60 0E 00 00 00 0E 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {332} normal block at 0x00377C10, 29 bytes long.
Data: <<N ` > 3C 4E 10 60 0C 00 00 00 0C 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {331} normal block at 0x00377BB8, 22 bytes long.
Data: <<N ` > 3C 4E 10 60 05 00 00 00 05 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {330} normal block at 0x00377B60, 24 bytes long.
Data: <<N ` > 3C 4E 10 60 07 00 00 00 07 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {329} normal block at 0x00372700, 30 bytes long.
Data: <<N ` > 3C 4E 10 60 0D 00 00 00 0D 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {328} normal block at 0x003726A0, 33 bytes long.
Data: <<N ` > 3C 4E 10 60 10 00 00 00 10 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {327} normal block at 0x00372638, 38 bytes long.
Data: <<N ` > 3C 4E 10 60 15 00 00 00 15 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {326} normal block at 0x00377250, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {325} normal block at 0x00377200, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {323} normal block at 0x003771A0, 32 bytes long.
Data: <<N ` > 3C 4E 10 60 0F 00 00 00 0F 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {322} normal block at 0x00372BA0, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {143} normal block at 0x003770B0, 24 bytes long.
Data: <<N ` > 3C 4E 10 60 07 00 00 00 07 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {142} normal block at 0x00377058, 22 bytes long.
Data: <<N ` > 3C 4E 10 60 05 00 00 00 05 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {141} normal block at 0x00372B40, 30 bytes long.
Data: <<N ` > 3C 4E 10 60 0D 00 00 00 0D 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {140} normal block at 0x00372AE8, 25 bytes long.
Data: <<N ` > 3C 4E 10 60 08 00 00 00 08 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {139} normal block at 0x00372A90, 23 bytes long.
Data: <<N ` > 3C 4E 10 60 06 00 00 00 06 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {138} normal block at 0x00372A40, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {137} normal block at 0x003729E0, 36 bytes long.
Data: <<N ` > 3C 4E 10 60 13 00 00 00 13 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {136} normal block at 0x00372990, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {135} normal block at 0x00372930, 32 bytes long.
Data: <<N ` > 3C 4E 10 60 0F 00 00 00 0F 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {134} normal block at 0x003728D8, 22 bytes long.
Data: <<N ` > 3C 4E 10 60 05 00 00 00 05 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {133} normal block at 0x00372888, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {132} normal block at 0x00372830, 22 bytes long.
Data: <<N ` > 3C 4E 10 60 05 00 00 00 05 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {131} normal block at 0x003727D0, 35 bytes long.
Data: <<N ` > 3C 4E 10 60 12 00 00 00 12 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {130} normal block at 0x00372778, 25 bytes long.
Data: <<N ` > 3C 4E 10 60 08 00 00 00 08 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {129} normal block at 0x00372420, 19 bytes long.
Data: <<N ` > 3C 4E 10 60 02 00 00 00 02 00 00 00 01 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {128} normal block at 0x003723C8, 26 bytes long.
Data: <<N ` > 3C 4E 10 60 09 00 00 00 09 00 00 00 01 00 00 00
Object dump complete.
Чесноков
|