0

My application contain too much forms. I run it on windows 7 and start observing the handles in task manager. Handles starts increasing and when it reaches at the limit of 7000, application gets crash. Then i uninstall the windows update KB2670838. In doing this the limit of handles do not exceed 800 even if i open 10 forms at a same time. Then i run my application on windows 8. Same problem occur. Then i uninstall the same update. But there is no effect on my application and even by opening only two forms the limit of handles increase upto 7000 and application gets crash.

Suggest any solution so that my application run properly on windows 8 just like windows 7.

Thankyou.

Actually my application contains too many forms and one form contains so many components. In InitializeComponent() method, i initialize all components and in the form close event i dispose all components i.e. MyBase.dispose(). At the time of initialization, the components occupy approx 600 to 700 handles and at the time of dispose, the components release only 100 handles and by opening the form again and again the handles crosses the range of 7000 and application gets crash.

As i have told u before that this scenario occur in windows 8 but not in windows 7 because i have uninstall the buggy update KB2670838 but when i uninstall this update in windows 8 there is no effect on it and same scenario occur.

  • the user cannot possibly be interacting with 10 forms at once and your app cannot possibly need 800 handles (handles to **what**, BTW) allocated/open. You might want to look at what the app is doing or more likely how it is doing it. – Ňɏssa Pøngjǣrdenlarp Mar 20 '14 at 21:19
  • Any drawing code? Make sure you dispose of your Images, Fonts, Pens and Brushes, etc. – LarsTech Mar 20 '14 at 21:23
  • 1
    Possible duplicate of [How to debug GDI object Leaks](http://stackoverflow.com/questions/8302287/how-to-debug-gdi-object-leaks/8306253#8306253) – Hans Passant Mar 20 '14 at 22:00
  • 2
    Start cutting pieces off your program, comment it out if you want. See when the problem stops. Start putting those pieces back. Regular troubleshooting procedure, try it! – Victor Zakharov Mar 21 '14 at 00:41

0 Answers0