Print Page | Close Window

Questions about Memory Link

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=5595
Printed Date: 29 May 2024 at 2:48am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Questions about Memory Link
Posted By: Joanna
Subject: Questions about Memory Link
Date Posted: 24 November 2006 at 5:28am
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!
 
 



Replies:
Posted By: Oleg
Date Posted: 24 November 2006 at 8:22am
Hi,
Is it dump of GUI_Whidbey sample? Did you change it somehow?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Oleg
Date Posted: 24 November 2006 at 8:24am
 I see -  you call CrtDumpMemoryLeaks in CMainFrame::OnClose, but CommandBars will be destroyed in destructor of CMainFrame. so all look right.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Joanna
Date Posted: 27 November 2006 at 2:36am

Hi,

Thank you for your apply.
But when I put the code
"_CrtDumpMemoryLeaks();" into the  destructor of CMainFrame like follow:
CMainFrame :: ~CMainFrame()
{
     _CrtDumpMemoryLeaks();
}
 
The debug will still give out upper memory leak report.
 
And when I use the same way to debug the other samples, like "DockingPane\MDIPanes", "PropertyGrid\DrawClient", and "UserInterface\GUI_VisualStudio7", and so on, all give out the same memory leak reports.
 
And then, I use another way to check the memory leak, the method is introducted as follow:
http://www.codeproject.com/tools/visualleakdetector.asp - http://www.codeproject.com/tools/visualleakdetector.asp
When I debug the samples of the Xtreme ToolkitPro 2006, it also shows that there are memory leaks. For examp in the sample "DockingPane\MDIPanes", the memory leak report just as follow:
 
---------- Block 2121 at 0x01B86CB0: 68 bytes ----------
  Call Stack:
    f:\reference\vc\内存泄露\vld\vld-10-src\vld (559): VisualLeakDetector::getstacktrace
    f:\reference\vc\内存泄露\vld\vld-10-src\vld (636): VisualLeakDetector::hookmalloc
    f:\reference\vc\内存泄露\vld\vld-10-src\vld (240): VisualLeakDetector::allochook
    c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxtempl.h (1442): CMap<unsigned int,unsigned int,CXTPImageManagerIcon *,CXTPImageManagerIcon *>::InitHashTable
    c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxtempl.h (1609): CMap<unsigned int,unsigned int,CXTPImageManagerIcon *,CXTPImageManagerIcon *>::operator[]
    c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxtempl.h (1358): CMap<unsigned int,unsigned int,CXTPImageManagerIcon *,CXTPImageManagerIcon *>::SetAt
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp (2170): CXTPImageManagerIconSet::CreateIcon
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp (2177): CXTPImageManagerIconSet::SetIcon
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp (2447): CXTPImageManager::SetIcon
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp (2532): CXTPImageManager::SetIcons
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp (2777): CXTPImageManager::SetIcons
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp (2819): CXTPImageManager::SetIcons
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\commandbars\xtptoolbar.cpp (418): CXTPCommandBar::LoadToolBar
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\commandbars\xtptoolbar.cpp (360): CXTPToolBar::LoadToolBar
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\samples\dockingpane\mdipanes\childfrm.cpp (108): CChildFrame::OnCreate
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp (2000): CWnd::OnWndMsg
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\commandbars\xtpframewnd.h (214): CXTPCommandBarsSiteBase<CMDIChildWnd>::OnWndMsg
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp (1741): CWnd::WindowProc
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp (240): AfxCallWndProc
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp (389): AfxWndProc
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\afxstate.cpp (407): AfxWndProcBase
    0x77D48734 (File and line number not available): GetDC
    0x77D4D05B (File and line number not available): EnumDisplayMonitors
    0x77D4B4C0 (File and line number not available): DefWindowProcW
    0x77D4FD29 (File and line number not available): UserClientDllInitialize
    0x7C90EAE3 (File and line number not available): KiUserCallbackDispatcher
    0x77D501F7 (File and line number not available): CreateWindowExW
    0x77D50291 (File and line number not available): CreateWindowExA
    0x77D6065B (File and line number not available): ChangeClipboardChain
    0x77D7F6AB (File and line number not available): DefFrameProcA
    0x77D48734 (File and line number not available): GetDC
    0x77D48816 (File and line number not available): GetDC
    0x77D4C63F (File and line number not available): IsWindowUnicode
    0x77D4E905 (File and line number not available): CallWindowProcA
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\commandbars\xtphookmanager.cpp (169): CXTPHookManager::HookWndProc
    0x77D48734 (File and line number not available): GetDC
    0x77D48816 (File and line number not available): GetDC
    0x77D4B89B (File and line number not available): GetParent
    0x77D5F3E3 (File and line number not available): SendMessageA
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\winmdi.cpp (548): CMDIChildWnd::Create
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\winmdi.cpp (618): CMDIChildWnd::LoadFrame
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\commandbars\xtpframewnd.h (253): CXTPFrameWndBase<CMDIChildWnd>::LoadFrame
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\doctempl.cpp (277): CDocTemplate::CreateNewFrame
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\docmulti.cpp (121): CMultiDocTemplate::OpenDocumentFile
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\docmgr.cpp (848): CDocManager::OnFileNew
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\appdlg.cpp (22): CWinApp::OnFileNew
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\cmdtarg.cpp (82): _AfxDispatchCmdMsg
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\cmdtarg.cpp (381): CCmdTarget::OnCmdMsg
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\appui2.cpp (24): CWinApp::ProcessShellCommand
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\samples\dockingpane\mdipanes\mdipanes.cpp (118): CMDIPanesApp::InitInstance
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\winmain.cpp (37): AfxWinMain
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\appmodul.cpp (29): WinMain
    f:\rtm\vctools\crt_bld\self_x86\crt\src\crtexe.c (578): __tmainCRTStartup
    f:\rtm\vctools\crt_bld\self_x86\crt\src\crtexe.c (403): WinMainCRTStartup
    0x7C816FD7 (File and line number not available): RegisterWaitForInputIdle
  Data:
    00 00 00 00    F4 6D B8 01    00 00 00 00    00 00 00 00     .....m.. ........
    00 00 00 00    00 00 00 00    00 00 00 00    00 00 00 00     ........ ........
    00 00 00 00    00 00 00 00    00 00 00 00    00 00 00 00     ........ ........
    00 00 00 00    00 00 00 00    00 00 00 00    00 00 00 00     ........ ........
    00 00 00 00                                                  ........ ........
---------- Block 2119 at 0x01B86AF8: 184 bytes ----------
  Call Stack:
    f:\reference\vc\内存泄露\vld\vld-10-src\vld (559): VisualLeakDetector::getstacktrace
    f:\reference\vc\内存泄露\vld\vld-10-src\vld (636): VisualLeakDetector::hookmalloc
    f:\reference\vc\内存泄露\vld\vld-10-src\vld (240): VisualLeakDetector::allochook
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp (2166): CXTPImageManagerIconSet::CreateIcon
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp (2177): CXTPImageManagerIconSet::SetIcon
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp (2447): CXTPImageManager::SetIcon
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp (2532): CXTPImageManager::SetIcons
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp (2777): CXTPImageManager::SetIcons
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\common\xtpimagemanager.cpp (2819): CXTPImageManager::SetIcons
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\commandbars\xtptoolbar.cpp (418): CXTPCommandBar::LoadToolBar
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\commandbars\xtptoolbar.cpp (360): CXTPToolBar::LoadToolBar
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\samples\dockingpane\mdipanes\childfrm.cpp (108): CChildFrame::OnCreate
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp (2000): CWnd::OnWndMsg
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\commandbars\xtpframewnd.h (214): CXTPCommandBarsSiteBase<CMDIChildWnd>::OnWndMsg
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp (1741): CWnd::WindowProc
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp (240): AfxCallWndProc
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp (389): AfxWndProc
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\afxstate.cpp (407): AfxWndProcBase
    0x77D48734 (File and line number not available): GetDC
    0x77D4D05B (File and line number not available): EnumDisplayMonitors
    0x77D4B4C0 (File and line number not available): DefWindowProcW
    0x77D4FD29 (File and line number not available): UserClientDllInitialize
    0x7C90EAE3 (File and line number not available): KiUserCallbackDispatcher
    0x77D501F7 (File and line number not available): CreateWindowExW
    0x77D50291 (File and line number not available): CreateWindowExA
    0x77D6065B (File and line number not available): ChangeClipboardChain
    0x77D7F6AB (File and line number not available): DefFrameProcA
    0x77D48734 (File and line number not available): GetDC
    0x77D48816 (File and line number not available): GetDC
    0x77D4C63F (File and line number not available): IsWindowUnicode
    0x77D4E905 (File and line number not available): CallWindowProcA
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\commandbars\xtphookmanager.cpp (169): CXTPHookManager::HookWndProc
    0x77D48734 (File and line number not available): GetDC
    0x77D48816 (File and line number not available): GetDC
    0x77D4B89B (File and line number not available): GetParent
    0x77D5F3E3 (File and line number not available): SendMessageA
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\winmdi.cpp (548): CMDIChildWnd::Create
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\winmdi.cpp (618): CMDIChildWnd::LoadFrame
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\source\commandbars\xtpframewnd.h (253): CXTPFrameWndBase<CMDIChildWnd>::LoadFrame
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\doctempl.cpp (277): CDocTemplate::CreateNewFrame
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\docmulti.cpp (121): CMultiDocTemplate::OpenDocumentFile
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\docmgr.cpp (848): CDocManager::OnFileNew
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\appdlg.cpp (22): CWinApp::OnFileNew
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\cmdtarg.cpp (82): _AfxDispatchCmdMsg
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\cmdtarg.cpp (381): CCmdTarget::OnCmdMsg
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\appui2.cpp (24): CWinApp::ProcessShellCommand
    c:\program files\codejock software\mfc\xtreme toolkitpro 2006\samples\dockingpane\mdipanes\mdipanes.cpp (118): CMDIPanesApp::InitInstance
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\winmain.cpp (37): AfxWinMain
    f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\appmodul.cpp (29): WinMain
    f:\rtm\vctools\crt_bld\self_x86\crt\src\crtexe.c (578): __tmainCRTStartup
    f:\rtm\vctools\crt_bld\self_x86\crt\src\crtexe.c (403): WinMainCRTStartup
    0x7C816FD7 (File and line number not available): RegisterWaitForInputIdle
  Data:
    BC CC CA 00    01 00 00 00    00 00 00 00    00 00 00 00     ........ ........
    00 00 00 00    01 00 00 00    00 00 00 00    48 47 15 00     ........ ....HG..
    04 80 00 00    10 00 00 00    0F 00 00 00    C3 09 96 00     ........ ........
    00 00 00 00    00 00 00 00    01 00 00 00    87 09 51 00     ........ ......Q.
    00 00 00 00    00 00 00 00    01 00 00 00    00 00 00 00     ........ ........
    00 00 00 00    00 00 00 00    01 00 00 00    00 00 00 00     ........ ........
    00 00 00 00    00 00 00 00    01 00 00 00    00 00 00 00     ........ ........
    00 00 00 00    00 00 00 00    01 00 00 00    00 00 00 00     ........ ........
    00 00 00 00    00 00 00 00    01 00 00 00    00 00 00 00     ........ ........
    00 00 00 00    00 00 00 00    01 00 00 00    00 00 00 00     ........ ........
    00 00 00 00    00 00 00 00    01 00 00 00    00 00 00 00     ........ ........
    38 68 B8 01    00 00 00 00                                   8h...... ........
.......................         ...............................
 
 
Visual Leak Detector detected 56 memory leaks.
'MDIPanesd.exe': Unloaded 'C:\WINDOWS\system32\dbghelp.dll'
'MDIPanesd.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
Visual Leak Detector is now exiting.
The thread 'Win32 Thread' (0x134c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x15b8) has exited with code 0 (0x0).
Codejock ToolkitPro Terminating!
The program '[4812] MDIPanesd.exe: Native' has exited with code 0 (0x0).
 


Posted By: Oleg
Date Posted: 27 November 2006 at 5:24am
Hello,
In C++, objects destroyed after destructor executed.
 
If there are memory leaks, Visual Stdio IDE will show them.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Joanna
Date Posted: 29 November 2006 at 10:22pm
Ok, I get it, thank you!


Posted By: asparagusx
Date Posted: 19 February 2007 at 2:31am
Hallo
 
I have exactly the same issue as well. Are you absolutely sure that these memory leaks are not real. I have checked this in both VC6 and VC8 (using VLD) and these leaks does worry me!
 
Anton Heymann


Posted By: Oleg
Date Posted: 20 February 2007 at 2:22am
Hi,
I was sure that leaks was not real in our sample, but not sure about all applications. It depends what you do in your code.
 
What exactly do you see.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: asparagusx
Date Posted: 20 February 2007 at 2:44am
Oleg
 
I have a complex application, but basically I create a number of toolbars and docking panes in CMainFrame::OnCreate (as you would expect). I 'link' my application with VLD.H and when the application closes down VLD issues a number of memory leak warnings, almost all of them orginating from (as an example)

CXTPToolBar *pTool = (CXTPToolBar *) pCommandBars->Add(Caption,Where);

I have checked this in both VC6 and VC8. I need to create a very large number of toolbars and each one of them issues the warning. I don't specifically delete any of the toolbars in CMainFrame::~CMainFrame
 
Regards
 
Anton


Posted By: asparagusx
Date Posted: 22 February 2007 at 12:10am

Oleg

Any progress on this? I do believe there to be a problem of some kind, probably in the clean-up of my application, altough reading the posts above it does appear to happen in sample apps as well.
 
Thanks
 
Anton
 


Posted By: Simon HB9DRV
Date Posted: 22 February 2007 at 2:56am
Originally posted by asparagusx asparagusx wrote:

Oleg
 
I have a complex application, but basically I create a number of toolbars and docking panes in CMainFrame::OnCreate (as you would expect). I 'link' my application with VLD.H and when the application closes down VLD issues a number of memory leak warnings, almost all of them orginating from (as an example)

CXTPToolBar *pTool = (CXTPToolBar *) pCommandBars->Add(Caption,Where);

I have checked this in both VC6 and VC8. I need to create a very large number of toolbars and each one of them issues the warning. I don't specifically delete any of the toolbars in CMainFrame::~CMainFrame
 
Regards
 
Anton
Anton,
 
I'm *very* pedantic about memory leaks as I have ~ 20,000 users and can't handle the complaints !
 
However, I have not yet seen any leaks from 10.4.2 (latest release). Sometimes these 3rd-party memory checking programs are at fault.


-------------
Simon HB9DRV


Posted By: asparagusx
Date Posted: 22 February 2007 at 3:15am
Simon https://forum.codejock.com/uploads/20070222_031305_memleaks.zip - uploads/20070222_031305_memleaks.zip
 
Please see zip with output from VC8. I used VLD to detect this. I have been using VLD for a number of years now and it has always been very good at detecting real leaks. Same as you, I also have a large number of clients and if these memory leaks are real, I will also be concerned.
 
As I mentioned, I don't specifically delete any toolbars (same as numerous other samples).
 
Thanks
 
Anton


Posted By: asparagusx
Date Posted: 22 February 2007 at 3:18am
Sorry
 
Forgot to add - my toolbar resources (plus all other resources) are located in an external 'resource' dll and I am dynamically linking to XTP DLL.
 
Anton


Posted By: Oleg
Date Posted: 22 February 2007 at 11:03am
Hello,
Think your VLD mistakes if used external DLL or something.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net