01: /*
02: * CommandWithDispose.java --
03: *
04: * Interface for Commands that need to know when they are deleted
05: * from an interpreter.
06: *
07: * Copyright (c) 1997 Sun Microsystems, Inc.
08: *
09: * See the file "license.terms" for information on usage and
10: * redistribution of this file, and for a DISCLAIMER OF ALL
11: * WARRANTIES.
12: *
13: * RCS: @(#) $Id: CommandWithDispose.java,v 1.2 1999/07/28 03:41:13 mo Exp $
14: */
15:
16: package tcl.lang;
17:
18: /**
19: * This interface is implemented by Commands that need to know when
20: * they are deleted from an interpreter. Most commands do not need
21: * to know when they are deleted in Java because Java will garbage
22: * collect any allocations made by the command. However, sometimes
23: * a command may hold onto resources that must be explicitly released.
24: * This interface allows those commands to be notified when they are
25: * being deleted from the interpreter.
26: */
27:
28: public interface CommandWithDispose extends Command {
29: public void disposeCmd(); // The disposeCmd method is called when the
30: // interp is removing the Tcl command.
31: }
|