diff options
author | dgp <dgp@users.sourceforge.net> | 2017-09-12 13:22:46 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-09-12 13:22:46 (GMT) |
commit | b1dc2099c73d4588f26bf86db45046014d647a12 (patch) | |
tree | c87375561a6e649ce08b496d58fb1eae7040cb86 /generic | |
parent | 89524bf4844ba4249cf17c065af82f7169049e8d (diff) | |
download | tcl-b1dc2099c73d4588f26bf86db45046014d647a12.zip tcl-b1dc2099c73d4588f26bf86db45046014d647a12.tar.gz tcl-b1dc2099c73d4588f26bf86db45046014d647a12.tar.bz2 |
When we invalidate the string rep of a dict, that's a sign we need to
free all the intreps of that dict as well.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclDictObj.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index f4e15a6..b312fe1 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -909,7 +909,11 @@ InvalidateDictChain( assert( dict != NULL); do { + dict->refCount++; TclInvalidateStringRep(dictObj); + Tcl_FreeIntRep(dictObj); + DictSetIntRep(dictObj, dict); + dict->epoch++; dictObj = dict->chain; if (dictObj == NULL) { |