Hi,
I had a question about the memory link by using the ToolkitPro1011vc80D. Does the object of the ToolkitPro can be automatically released? Do I need to write some code to release the objects?
What I have done in my project is just write according to the project "GUI_Whidbey" of the "Samples\UserInterface" folder.
And My build enviroment is VS2005, the dll that I used is ToolkitPro1011vc80D.dll.
Intent to send the memory link report into the output window, I add follow code into the stdafx.h:
// For test memeory leak #define CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h>
And then add follow code into the function of "OnClose" of Mainfram.cpp:
_CrtDumpMemoryLeaks();
And then when I debug the project "GUI_Whidbey" of the "Samples\UserInterface" folder, the VS give out follow memory leak report:
Dumping objects -> f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {8723} normal block at 0x01B73E08, 22 bytes long. Data: < >x > EC 97 3E 78 05 00 00 00 05 00 00 00 01 00 00 00 f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {8722} normal block at 0x003B3390, 25 bytes long. Data: < >x > EC 97 3E 78 08 00 00 00 08 00 00 00 01 00 00 00 f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\plex.cpp(29) : {2112} normal block at 0x01B5D0D0, 164 bytes long. Data: < X > 00 00 00 00 10 00 00 00 58 CF B5 01 00 00 00 00 {2111} normal block at 0x01B5D050, 68 bytes long. Data: < > 00 00 00 00 D4 D0 B5 01 00 00 00 00 00 00 00 00 c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp(2166) : {2110} client block at 0x01B5CF58, subtype c0, 184 bytes long. a CCmdTarget object at $01B5CF58, 184 bytes long c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp(2445) : {2109} client block at 0x01B5CED8, subtype c0, 68 bytes long. a CCmdTarget object at $01B5CED8, 68 bytes long f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\plex.cpp(29) : {2104} normal block at 0x01B5CDF8, 164 bytes long. Data: < > 00 00 00 00 10 00 00 00 80 CC B5 01 00 00 00 00 {2103} normal block at 0x01B5CD78, 68 bytes long. Data: < > 00 00 00 00 FC CD B5 01 00 00 00 00 00 00 00 00 c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp(2166) : {2102} client block at 0x01B5CC80, subtype c0, 184 bytes long. a CCmdTarget object at $01B5CC80, 184 bytes long c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp(2445) : {2101} client block at 0x01B5CC00, subtype c0, 68 bytes long. a CCmdTarget object at $01B5CC00, 68 bytes long f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\plex.cpp(29) : {2100} normal block at 0x01B5CB20, 164 bytes long. Data: <0 0 H , ; > 30 AA B5 01 30 E1 00 00 48 C8 B5 01 2C BB 3B 00 f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\plex.cpp(29) : {2095} normal block at 0x01B5CA40, 164 bytes long. Data: < > 00 00 00 00 10 00 00 00 C8 C8 B5 01 00 00 00 00 {2094} normal block at 0x01B5C9C0, 68 bytes long. Data: < D > 00 00 00 00 44 CA B5 01 00 00 00 00 00 00 00 00 c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp(2166) : {2093} client block at 0x01B5C8C8, subtype c0, 184 bytes long. a CCmdTarget object at $01B5C8C8, 184 bytes long c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp(2445) : {2092} client block at 0x01B5C848, subtype c0, 68 bytes long. a CCmdTarget object at $01B5C848, 68 bytes long f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\plex.cpp(29) : {2087} normal block at 0x01B5C768, 164 bytes long. Data: < > 00 00 00 00 10 00 00 00 F0 C5 B5 01 00 00 00 00 {2086} normal block at 0x01B5C6E8, 68 bytes long. Data: < l > 00 00 00 00 6C C7 B5 01 00 00 00 00 00 00 00 00 c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp(2166) : {2085} client block at 0x01B5C5F0, subtype c0, 184 bytes long. a CCmdTarget object at $01B5C5F0, 184 bytes long c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp(2445) : {2084} client block at 0x01B5C570, subtype c0, 68 bytes long. a CCmdTarget object at $01B5C570, 68 bytes long f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\plex.cpp(29) : {2079} normal block at 0x01B5C490, 164 bytes long. Data: < > 00 00 00 00 10 00 00 00 18 C3 B5 01 00 00 00 00 {2078} normal block at 0x01B5C410, 68 bytes long. Data: < > 00 00 00 00 94 C4 B5 01 00 00 00 00 00 00 00 00 c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp(2166) : {2077} client block at 0x01B5C318, subtype c0, 184 bytes long. a CCmdTarget object at $01B5C318, 184 bytes long c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp(2445) : {2076} client block at 0x01B5C298, subtype c0, 68 bytes long. a CCmdTarget object at $01B5C298, 68 bytes long f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\plex.cpp(29) : {2071} normal block at 0x01B5C1B8, 164 bytes long. Data: < @ > 00 00 00 00 10 00 00 00 40 C0 B5 01 00 00 00 00 {2070} normal block at 0x01B5C138, 68 bytes long. Data: < > 00 00 00 00 BC C1 B5 01 00 00 00 00 00 00 00 00 c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp(2166) : {2069} client block at 0x01B5C040, subtype c0, 184 bytes long. a CCmdTarget object at $01B5C040, 184 bytes long c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp(2445) : {2068} client block at 0x01B5BFC0, subtype c0, 68 bytes long. a CCmdTarget object at $01B5BFC0, 68 bytes long
........................
So, why there are such kind of memory leak?
Thanks!
|