Solved

Handle count problem

Posted on 2007-04-02
4
352 Views
Last Modified: 2008-02-01
I have an application which had a memory leak.  It is an appointments application.  We built a stress test that cycles through the list of appointments and opens and closes the appointment form.  I believed I had found the memory leak, a print preview dialog that belonged to the appointment form.  I explicitly disposed of the Print Preview Dialog in the appointment form's dispose method and my memory count, viewable through task manager, seemed to be stable.  Previously our stress test would only cycle through the appointments list 5 times.  Now, the test is able to cycle 11 times.  My problem is that now when the application crashes in the 11th cycle, my task manager shows some info.  It tells me that my memory seems to be okay for the process (39,220K) but my handles count is extreme(46,427).  How could I be releasing memory, but my handles are not??????
0
Comment
Question by:gvector1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
AlexNek earned 500 total points
ID: 18838422
Window handles and memory using is something differnt.
Here is one sample:
http://blogs.msdn.com/jfoscoding/archive/2004/11/24/269416.aspx
0
 

Author Comment

by:gvector1
ID: 18839743
Very interesting article.  It did give me some useful information.  There is no doubt that my handle leak is a major problem, any suggestions on how to track down the cause of this leak????
0
 
LVL 16

Expert Comment

by:AlexNek
ID: 18839804
It depends which handles are you using. It look like that you draw a bit and not free resources back.
First try to analize your code. Go in debug mode over your code and look at handle count.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question