Hi Todd, > Perhaps something like: > (java NIL 'obj) for removing it from the hashtable? The "complex management" > of this could then be handled in pure Picolisp...
Very good idea! This fits nicely into the 'java' syntax, and has no harmful effects if used wisely ;) > Would it be as simple as something like (in Reflector.java reflect()): > if (y == InOut.Nil) { // Release > reference to Object > Object o = lst[1]; // object to > release > int idx = o.hashCode(); > InOut.Obj.remove(idx); > Io.Out.write(InOut.NIX); > Io.Out.write(InOut.NIX); > x = null; > > Or am I heading in the wrong direction? No, this is basically correct. The write's are not needed, as they happen at the end of reflect() anyway. So I inseted: 1c1 < // 31jul23abu --- > // 25aug23abu 58a59 > // (java NIL 'obj) -> NIL Release reference to object 120c121,125 < if (y == InOut.T) { // Define interface --- > if (y == InOut.Nil) { // Release reference to object > InOut.Obj.remove(lst[1].hashCode()); > x = null; > } > else if (y == InOut.T) { // Define interface and did some test. Works fine, and gives - as expected - a null pointer exception if the object is accessed from Lisp again. I cannot make a release to PlayStore now, as PilBox is in the process of some changes to prepare for Android 14. So I made a temporary release available at: https://picolisp.com/pub/pilBox.apk https://picolisp.com/pub/PilBox.tgz Thanks a lot for the good idea! :) ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe