>>> They pile up, one for each run. Eventually, system problems begin to
>>> occur. Plus, when you try to shut down windows, you get all of these
>>> instances not responding to windows.
>>>
>>> It sure sounds like a memory leak, or a failure to dispose a system
>>> resource, such as a non standard color.
>>>
>>> But, we've scoured our app and commented out all such Color creations.
>>> this problem. We have verified that this problem does not occur with
>>> simplistic apps.
>>>
>>> Anyone have any ideas on...?
>>> 1. What our problem is
>>> 2. Strategies for troubleshooting
>>>
> Thank you for taking the time to post, Steve. The information in your
> response is valuable to us.
> We are using JFace. Specifically, we have an ApplicationWindow class
> contains a main method. So, I believe handling the event loop is
> automatically done by ApplicationWindow-- it's buried and not available
> for us to see (until we figure out how to attach source and JavaDoc to
> libs we use).
> What would you suggest we look at next?
> I was in the process of commenting out chunks of the program, piece by
> piece until the zombie javaw.exe no longer hangs around in Task Manager.
> But now, the knowledge that failure to dispose() would not cause this
> problem makes us wonder just what sort of problem we are chasing.
> Our main method looks like the following. It was auto-generated by the
> GUI builder available from swt-designer.com.
> public static void main(String args[]) {
> try {
> MainWindow window = new MainWindow();
> window.setBlockOnOpen(true);
> window.open();
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
OK, it looks like we were not dispose'ing Display. Thank you Bahram, for
suggesting that earlier.
The reason that this stumped us is that all of the code is autogenerated
by a GUI designer tool that we assumed worked. We've contacted the
manufacturer (who sent us here).
Our new main method now looks like below.
public static void main(String args[]) {
try {
MainWindow window = new MainWindow();
window.setBlockOnOpen(true);
Display.getCurrent().dispose();
} catch (Exception e) {
e.printStackTrace();
}
}