Debugging the handle leak 
Author Message
 Debugging the handle leak

Environment : VC++ 7.0 , Windows NT

Hi all,

How can I debug the handle leak in my application?
In the NT Task Manager I can see the handle count.
Is there a way to find out for what purpose is a handle count increasing?
Or any way I could know why a handle has been allocated and for what
purpose?
I suspect a handle leak in my application , whats the best way to debug it?

Regards,
Aditya



Tue, 31 May 2005 14:31:17 GMT  
 Debugging the handle leak
Hi Aditya,
try ProcessExplorer from www.sysinternals.com
Regards,
Juergen



Quote:
> Environment : VC++ 7.0 , Windows NT

> Hi all,

> How can I debug the handle leak in my application?
> In the NT Task Manager I can see the handle count.
> Is there a way to find out for what purpose is a handle count increasing?
> Or any way I could know why a handle has been allocated and for what
> purpose?
> I suspect a handle leak in my application , whats the best way to debug
it?

> Regards,
> Aditya



Tue, 31 May 2005 18:21:54 GMT  
 Debugging the handle leak
If you can reproduce the problem on XP or .NET Server:

1. Install Application Verifier from
http://www.*-*-*.com/

2. Install de{*filter*}s from http://www.*-*-*.com/

3. In AppVerifier, enable handle checks for your app

4. Run your application and wait until it leaks enough handles

5. Attach windbg or cdb to it

6. Use !handle command to dump all handles. This should tell you what type
of object is leaking (event, file etc). Then dump only these objects using
'!handle 0 1 <type>'

7. Use !htrace to dump stack traces for several handles from the middle of
the list. For objects that have names '!handle <value> f' can also help.

Quote:

> Environment : VC++ 7.0 , Windows NT

> Hi all,

> How can I debug the handle leak in my application?
> In the NT Task Manager I can see the handle count.
> Is there a way to find out for what purpose is a handle count increasing?
> Or any way I could know why a handle has been allocated and for what
> purpose?
> I suspect a handle leak in my application , whats the best way to debug
it?

> Regards,
> Aditya



Wed, 01 Jun 2005 03:26:04 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Handle leak, memory leak...

2. Handle/Memory Leak IWebBrowser IE6.0

3. IWebBrowser2 Navitage Leaks HANDLES on some machines but not on others

4. Handle leaks

5. ADO component leaks handles

6. tracking handle leaks

7. Leak handle

8. How to track handle leaks?

9. bitmap handles and resource leak question

10. CloseHandle() - A memory leak of handle

11. Possible CDatabase Event Handle Leak

12. Finding leaking handles

 

 
Powered by phpBB® Forum Software