[Xotcl] results of the poll

Zoran Vasiljevic zoran at archiware.com
Mon Mar 4 18:21:42 CET 2002


On Monday 04 March 2002 14:08, Gustaf Neumann wrote:

>  From the "volatile" front: we have now more-or-less Zoran

Smile !

>  suggestion implemented in C. Actually there is no need
>  in general for using tcl-variables to implement volatile
>  objects (we could handle this on a pop of stack frames),
>  but at least for pure tcl-procs, var traces are the simplest
>  implementation. The current implementation (purely in C)

It is not clear: does the C implementation use internal stack
for garbage collection or the Tcl-trace variable mechansim?
It is important to know when doing (or not doing!) such
constructs:

Class foo
foo instproc test args {}

[foo new -volatile] test  ; # object leak ?

In case of volatile implementation with var traces,
one should do:

set bar [foo new -volatile]
$bar test
 
to be sure that when "bar" is unset, the object goes away.

So, which way is it?


Cheer's
Zoran



More information about the Xotcl mailing list