Posted to tcl by colin at Sun Nov 14 22:12:45 GMT 2010view raw

  1. oo::class create Foo {
  2. destructor {
  3. variable live 0
  4. puts stderr "destroying"
  5. }
  6. method bar {} {
  7. variable live 1
  8. my destroy
  9. puts stderr "It LIVES $live"
  10. }
  11. }
  12.  
  13. Foo create moop
  14. moop bar