diff options
author | msofer <msofer@noemail.net> | 2001-10-06 00:12:11 (GMT) |
---|---|---|
committer | msofer <msofer@noemail.net> | 2001-10-06 00:12:11 (GMT) |
commit | 7aef534ea3723e703428155fa69b912498fa7f18 (patch) | |
tree | 4d52e98b13e44d19974a627a07263ca3c4ce62cd /generic | |
parent | 7ddb0e68d78cf448f1fa70726dc0cd862077430c (diff) | |
download | tcl-7aef534ea3723e703428155fa69b912498fa7f18.zip tcl-7aef534ea3723e703428155fa69b912498fa7f18.tar.gz tcl-7aef534ea3723e703428155fa69b912498fa7f18.tar.bz2 |
insured that self-referential bytecodes are properly cleaned up on
interpreter deletion [Bug 467523]
FossilOrigin-Name: 6a3580fdd4296fa27e94a6e405edb955d3d2aaf2
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclLiteral.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index 37ef1db..9c39e4b 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLiteral.c,v 1.8 1999/08/19 02:59:10 hobbs Exp $ + * RCS: @(#) $Id: tclLiteral.c,v 1.9 2001/10/06 00:12:11 msofer Exp $ */ #include "tclInt.h" @@ -715,6 +715,16 @@ TclReleaseLiteral(interp, objPtr) */ codePtr->objArrayPtr[0] = NULL; + + /* + * At this point, objPtr has three references: one each + * from the global and local literal tables, and one + * self-referential (it is its own internal rep). In + * order to allow the object to be cleared, we remove + * one reference [Bug 467523]. + */ + + Tcl_DecrRefCount(objPtr); } } |