'No more handles' SWT Exception [message #437056] |
Fri, 28 May 2004 08:26 |
Eclipse User |
|
|
|
Originally posted by: cbr.teamlog.com
Does anybody could tell me what this exception means :
org.eclipse.swt.SWTError: No more handles
Thanks for feedbacks,
-MaRc
|
|
|
Re: 'No more handles' SWT Exception [message #437057 is a reply to message #437056] |
Fri, 28 May 2004 09:14 |
Eclipse User |
|
|
|
Originally posted by: v.j.b
> org.eclipse.swt.SWTError: No more handles
it is most likely that you are using some of the painting functions of SWT,
or some objects like Colors, Images, etc, that you _yourself_ need to
dispose of when no longer used. So, after you're finished with them, call
(objectname).dispose().
The handles are the id's used by the operating system to refer to resources
such as images and windows. In SWT it is obligatory to dispose of those
yourself, instead of relying on the garbage collector (which does not know
of any os resources, afaik).
|
|
|
|
Re: 'No more handles' SWT Exception [message #740284 is a reply to message #437056] |
Tue, 18 October 2011 10:44 |
Kees Pieters Messages: 24 Registered: July 2009 |
Junior Member |
|
|
This problem can also occur if you perform an intensive ui update operation, such as expanding a tree view. As you delegate the update to the ui thread, it becomes easier to call the, for instance 'expandall' function multiple times, with the risk that the tree is busy with expanding when it gets the following call to do so, etc. It may be wise to prevent this from happening by either introducing a boolean 'updating' to prevent consecutive calls from performing an expand if the thread is busy, or use other means of slowing down the expand calls (e.g. in a separate thread) .
I had this happening when we wanted to visualise a process, with the expand option, but as the process was so fase, the GUI could not keep up
|
|
|
|
Powered by
FUDForum. Page generated in 0.03181 seconds