if (core.debugger != null) { core.debugger.contextExited(context); core.debugger.contextReleased(context); }
    public synchronized void exitContext() {        context.removeThreadLocal("reval");        context.removeThreadLocal("engine");        context.removeThreadLocal("threadscope");        Context.exit();        // core.global.unregisterScope();        thread = null;        // if visual debugger is on let it know we're exiting a context        if (core.debugger != null) {            core.debugger.contextExited(context);            core.debugger.contextReleased(context);        }        // loop through previous globals and unset them, if necessary.        if (lastGlobals != null) {            for (Iterator i = lastGlobals.keySet().iterator(); i.hasNext();) {                String g = (String) i.next();                try {                    global.delete(g);                } catch (Exception x) {                    System.err.println("Error resetting global property: " + g);                }            }            lastGlobals = null;        }    }