htRegistry.remove(name);
}
synchronized private static void cleanRegistry() {
Enumeration keys = htRegistry.keys();
AppletWrapper app = null;
boolean closed = true;
while (keys.hasMoreElements()) {
String theApplet = (String) keys.nextElement();
try {
app = (AppletWrapper) (htRegistry.get(theApplet));
JSObject theWindow = JSObject.getWindow(app);
//System.out.print("checking " + app + " window : ");
closed = ((Boolean) theWindow.getMember("closed")).booleanValue();
//System.out.println(closed);
if (closed || theWindow.hashCode() == 0) {
//error trap
}
if (Logger.debugging)
Logger.debug("Preserving registered applet " + theApplet
+ " window: " + theWindow.hashCode());
} catch (Exception e) {
closed = true;
}
if (closed) {
if (Logger.debugging)
Logger.debug("Dereferencing closed window applet " + theApplet);
htRegistry.remove(theApplet);
app.destroy();
}
}
}