[Tcl Java] preserve/release or use GC

2000-06-26 Thread Jiang Wu
I tried Mo's patch on CObject.finalize() to see if any TclBlend code will leak C objects. And it does. There are a number of places in the "tcljava" code that do: TclList.index(interp,list,0).toString(); This will cause a CObject to be garbage collected without first releasing the

[Tcl Java] Re: [Tcl Java] preserve/release or use GC

2000-06-26 Thread Jeff Sturm
Jiang Wu wrote: TclObject listElement = TclList.index(...); listElement.preserve(); listElement.toString(); listElement.release(); This doesn't seem too horrible... Or we can try to fix the CObject finalize. I propose something like this: [...] Any