How to detect illegal memory consuming?
-
I have a multi-thread MFC application. I used Ado2 moudule by "Carlos Antollini" to act with my database. When I monitor my application by windows TaskManger, I see that "Mem Usage" & "VM Size" of my application is increasing without freeing memory until I close the application. I read most of memory management documents and I could not solve my application problem. Also I test some useful tools like "Trial DeLeaker" to detect problem. But all of memory leak tools report no memory leak! Specialty "DeLeaker" says "no GDI leak", "no Mem Leaks", "no Handle leaks". Please give me tips to find my problem. Can I find my problem by Rational Purify? I have not it. Thanks.
-
I have a multi-thread MFC application. I used Ado2 moudule by "Carlos Antollini" to act with my database. When I monitor my application by windows TaskManger, I see that "Mem Usage" & "VM Size" of my application is increasing without freeing memory until I close the application. I read most of memory management documents and I could not solve my application problem. Also I test some useful tools like "Trial DeLeaker" to detect problem. But all of memory leak tools report no memory leak! Specialty "DeLeaker" says "no GDI leak", "no Mem Leaks", "no Handle leaks". Please give me tips to find my problem. Can I find my problem by Rational Purify? I have not it. Thanks.
what happens if you minimize you program's window ?
-
what happens if you minimize you program's window ?
When I minimize my application, it frees some of "Mem Usage". But still it keeps used "VM Size". Also it keeps memory consuming when I restore it or it remains minimized. I still wait for a solution. Thanks.
-
I have a multi-thread MFC application. I used Ado2 moudule by "Carlos Antollini" to act with my database. When I monitor my application by windows TaskManger, I see that "Mem Usage" & "VM Size" of my application is increasing without freeing memory until I close the application. I read most of memory management documents and I could not solve my application problem. Also I test some useful tools like "Trial DeLeaker" to detect problem. But all of memory leak tools report no memory leak! Specialty "DeLeaker" says "no GDI leak", "no Mem Leaks", "no Handle leaks". Please give me tips to find my problem. Can I find my problem by Rational Purify? I have not it. Thanks.
-
is the database server on your cp ? mybe the database. and what did your programme do when the memory increased.
it's my pleasure to make friend with you.
I used a simple access file (.mdb) in local computer. My application became slow after memory consumption!
-
I have a multi-thread MFC application. I used Ado2 moudule by "Carlos Antollini" to act with my database. When I monitor my application by windows TaskManger, I see that "Mem Usage" & "VM Size" of my application is increasing without freeing memory until I close the application. I read most of memory management documents and I could not solve my application problem. Also I test some useful tools like "Trial DeLeaker" to detect problem. But all of memory leak tools report no memory leak! Specialty "DeLeaker" says "no GDI leak", "no Mem Leaks", "no Handle leaks". Please give me tips to find my problem. Can I find my problem by Rational Purify? I have not it. Thanks.
I've used Dan Moulding's Visual Leak Detector[^] when tracking down memory leaks. But I really recommend you to read this article[^] as chances are that you don't have a memory leak at all.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown -
I have a multi-thread MFC application. I used Ado2 moudule by "Carlos Antollini" to act with my database. When I monitor my application by windows TaskManger, I see that "Mem Usage" & "VM Size" of my application is increasing without freeing memory until I close the application. I read most of memory management documents and I could not solve my application problem. Also I test some useful tools like "Trial DeLeaker" to detect problem. But all of memory leak tools report no memory leak! Specialty "DeLeaker" says "no GDI leak", "no Mem Leaks", "no Handle leaks". Please give me tips to find my problem. Can I find my problem by Rational Purify? I have not it. Thanks.
I found my problem using Easy Detection of Memory Leaks[^].
BOOL CSmartToolTip::SetTipText(CWnd *pTipOwnerWnd, CString strTip )
{
TOOLINFO ti;\_CreateTipWnd(); // Fill tool tip info structure: // (Set flags to indicates that the uId member is the window handle // to the tool, and to indicate that the ToolTip control should subclass // the tool's window to intercept messages.) ti.cbSize = sizeof(ti); // size of this structure ti.uFlags = TTF\_IDISHWND | TTF\_SUBCLASS; // flags ti.hwnd = pTipOwnerWnd->GetParent()->GetSafeHwnd(); // handle to the window that contains the tool ti.uId = (UINT)pTipOwnerWnd->GetSafeHwnd(); // application-defined identifier of the tool ti.hinst = AfxGetResourceHandle(); // handle to the instance that contains the string resource for the tool ti.lpszText = (LPTSTR)((LPCTSTR)strTip); // pointer to the buffer that contains the text for the tool // Send add tool message and return result: // return CToolTipCtrl::AddTool( pTipOwnerWnd->GetParent(), 1 ); return((BOOL)SendMessage(TTM\_ADDTOOL, 0, (LPARAM)&ti));
}
void CSmartToolTip::_CreateTipWnd()
{
// We must create its once!
if( ! IsWindow(*this) )
{
// Create ToolTip control
this->Create( NULL );SetTipBkColor( RGB( 255, 255, 0) ); SetTipTextColor( RGB( 0, 0, 0) ); // Enable multiline ::SendMessage( \*this, TTM\_SETMAXTIPWIDTH, 0, (LPARAM)(INT) MAKELONG(400, 0)); }
}
The problem located in above code. I periodically call above function in my application. But why leak? Can any one help me please?