01: /*
02: * ReleaseNewListCmd.java --
03: *
04: * When a list that was allocated in Java is released, it
05: * should not be released again by the cleanup queue.
06: *
07: * Copyright (c) 2002 by Mo DeJong
08: *
09: * See the file "license.terms" for information on usage and redistribution
10: * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11: *
12: * RCS: @(#) $Id: ReleaseNewListCmd.java,v 1.1 2002/12/21 04:05:19 mdejong Exp $
13: */
14:
15: package tests;
16:
17: import tcl.lang.*;
18:
19: public class ReleaseNewListCmd implements Command {
20: public void cmdProc(Interp interp, TclObject[] objv)
21: throws TclException {
22: TclObject obj = TclList.newInstance();
23: TclList.append(interp, obj, TclString.newInstance("E1"));
24: TclList.append(interp, obj, TclString.newInstance("E2"));
25: TclList.append(interp, obj, TclString.newInstance("E3"));
26:
27: obj.release();
28: return;
29: }
30: }
|