diff --git a/src/main/java/tcl/lang/Interp.java b/src/main/java/tcl/lang/Interp.java index 539cfb3..e883c14 100644 --- a/src/main/java/tcl/lang/Interp.java +++ b/src/main/java/tcl/lang/Interp.java @@ -374,7 +374,8 @@ public class Interp extends EventuallyFreed { // List of unsafe commands: static final String[] unsafeCmds = { "encoding", "exit", "load", "cd", "fconfigure", "file", "glob", "open", "pwd", - "socket", "beep", "echo", "ls", "resource", "source", "exec", "source" }; + "socket", "beep", "echo", "ls", "resource", "source", "exec", "jaclloadjava", "jaclloadtjc", + "auto_execok", "auto_import", "auto_load", "auto_load_index", "auto_qualify"}; // Flags controlling the call of invoke. diff --git a/src/main/java/tcl/pkg/java/ReflectObject.java b/src/main/java/tcl/pkg/java/ReflectObject.java index 85465c3..4591dcc 100644 --- a/src/main/java/tcl/pkg/java/ReflectObject.java +++ b/src/main/java/tcl/pkg/java/ReflectObject.java @@ -532,7 +532,7 @@ else if (cl == Void.TYPE) ReflectObject roRep = findInReflectTable(interp, cl, obj); - if (roRep != null) { + if (roRep != null && roRep.isValid) { // If it is already in the table just increment the use count and // return it @@ -931,6 +931,7 @@ public void disposeCmd() { } isValid = false; + dispose(); } /*