简体   繁体   中英

Handle leak in .Net 2.0 windows application

We have to handle leaks in our application.

We are testing some viewers in our application for some 200 open and close,and found that the handles count is around 200.

For the same viewer the memory usage is constant and also the GDI count is also constant.

The thing is that the handles are increasing each time, but is not constant. Sometimes it is increasing by 5, sometimes by 1 and sometimes it is decreasing. We were not able to see a constant increase as that of GDI leaks.

We have already unsubscribed all the events registered in the application and also disposed all the controls used in the application. Before some memory leak was also there in the application. After disposing all the controls now it remains constant.

So what are all things else we need to check in this case. We are little confused since the memory/GDI count is constant while the handles only increasing.

Any suggestions appreciated.

Use a tool like Process Explorer to examine the handles your process has open. Select your process from the list and go to View > Lower Pane View > Handles. By default, the lower pane shows only the named handles. You can go to View > Show Unnamed Handles and Mappings to show them all.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM