5

from time to time I am haunted by the "org.eclipse.swt.SWTError: No more handles". I already know tools like GDIView, to watch the number of handles allocated, but now I wonder if there is a better way to do this.

Is there a tool available? Maybe one that logs all stacktraces when handles are created? And which shows the new handles between two invocation points?

Regards, Daniel

PS: Added the windows tag because dev occures mostly on windows and a windows only tool would be good enough.

4

2 回答 2

3

I found out about Sleak, a great tool to debug SWT resources! Highly recommended for everyone with the same problems. Even shows the images for image resources!

于 2011-03-14T15:09:08.947 回答
0

For me the issue was simply that new Shell() has been called too often. Storing the shell as static member and reusing it helped. Therefore, before applying a tool like Sleak, others might want to do a full text search for "new Shell" and check that they don't have the same simple cause.

于 2017-02-24T12:24:41.067 回答