Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
Problem with UltraWinTabControl - Disposing Tab Object
posted

Hi everyone,

I've stumbled upon a minor problem with the UltraWinTabControl. Recently one of our main applications had more and more crashes. It was always a Win32Exception with the message:

"Error creating window handle"

I did some research in the web what could cause this problem and came to the conclusion that our application reaches the limit for "USER Objects".

More information about this topic can be found here:

http://weblogs.asp.net/fmarguerie/archive/2009/08/07/cannot-create-window-handle-desktop-heap.aspx 

After investigating our application I found the leak. The Tabs that you close on a UltraWinTabControl are not automatically disposed. I don't know if that is intentionally, but it sure can become a Problem if you open many tabs. You can check out that behaviour yourself. 

1. Open the Task Manager and add the 2 Columns "USER Objects" and "GDI Objects"

2. Open the sample application "Tab Basic Feautures"  (by Infragistics) and close some tabs and check the USER Objects count. 

3. Download our small sample app and try it yourself. 

We worked around the problem by disposing the Tab-Object ourselves in the TabClosed-Event. If there is a reason why we shouldn't do it please let us know.

Greetings,

Andre

 

 

TabClosingNotDisposingExample.rar