[Xotcl] "tie" command

Zoran Vasiljevic zoran at archiware.com
Fri Jan 24 10:46:16 CET 2003


On Friday 24 January 2003 04:32, Kristoffer Lawson wrote:
> Been thinking if this would make sense:
>
> while {$stuff} {
>   tie myVar [MyClass new]
>   ...
> }

Wait...

You know about:

  set myVar [MyClass new -volatile]

?

When the myVar goes out of scope, the destructor
is automatically called. It's been there since 0.9.4
or so, IIRC.

Cheers
Zoran




More information about the Xotcl mailing list