Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7b132252fa499687d41e137ff947968c3ebb5f8d
Ticket: 1740700fffffffffffffffffffffffffffffffff
var deletion infinite loop
User & Date: msofer on 2007-07-07 02:29:24
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    Originator: NO
    
    The algorithm for variable deletion on namespace death keeps unsetting variables (and running unset traces) until no more are left. It does make sure that a variable cannot revive *itself* (ie, #1746143 is not possible on namespace deletion), but makes otherwise no difference between variables that existed at the time of the [namespace delete] call and those that were created afterwards.
    
    This does look like a bug to me - but I am not sure what the right behaviour would be. One radical solution would be to unhook the ns's variable table before starting to unset, replacing it with an empty one. After unsetting all variables in the main table, the second table would be deleted without running unset traces. Such a thing would change the semantics slightly: no pre-existing variable in this namespace is accessible while var unset traces are running. In contrast, today they may (or may not) be: variables are unset in table order (ie, more or less random), so some of them may still be accessible while others are already gone. Can't imagine much use for this.
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"