Index: generic/nsf.c =================================================================== diff -u -r13b407ab191abf3b90b563d04f7876d812fe235c -r609284c9079711f91047a5fd78a21968f7a0e373 --- generic/nsf.c (.../nsf.c) (revision 13b407ab191abf3b90b563d04f7876d812fe235c) +++ generic/nsf.c (.../nsf.c) (revision 609284c9079711f91047a5fd78a21968f7a0e373) @@ -5748,8 +5748,9 @@ fprintf(stderr, "NSCleanupNamespace %p %.6x varTablePtr %p\n", nsPtr, ((Namespace *)nsPtr)->flags, varTablePtr); #endif /* - * Delete all variables and initialize var table again - * (TclDeleteVars frees the var table). + * Delete all variables and initialize var table again (TclDeleteVars frees + * the var table). Any unset-traced variable has been deleted before + * (UnsetTracedVars). */ TclDeleteVars((Interp *)interp, varTablePtr); TclInitVarHashTable(varTablePtr, (Namespace *)nsPtr); @@ -18572,6 +18573,8 @@ } if (object->varTablePtr != NULL) { + /* Any unset-traced variable has been deleted before + (UnsetTracedVars) */ TclDeleteVars(((Interp *)interp), object->varTablePtr); ckfree((char *)object->varTablePtr);