diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2001-10-06 01:00:28 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2001-10-06 01:00:28 (GMT) |
commit | 817d4239057094b88dc9918d5e13ee81b08de18c (patch) | |
tree | 5b7c0dacb362fef589f9526d7bac8eae6e6d2950 | |
parent | 0c7f3d5fd4b373b8f5e28e15dae0d8a4039a8be7 (diff) | |
download | tcl-817d4239057094b88dc9918d5e13ee81b08de18c.zip tcl-817d4239057094b88dc9918d5e13ee81b08de18c.tar.gz tcl-817d4239057094b88dc9918d5e13ee81b08de18c.tar.bz2 |
insured that self-referential bytecodes are properly cleaned up on
interpreter deletion [Bug 467523]
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclLiteral.c | 12 |
2 files changed, 17 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2001-10-05 Miguel Sofer <msofer@users.sourceforge.net> + + * generic/tclLiteral.c: (TclReleaseLiteral) insured that + self-referential bytecodes are properly cleaned up on interpreter + deletion [Bug 467523] + 2001-10-04 Jeff Hobbs <jeffh@ActiveState.com> * library/encoding/cp1250.enc: diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index 37ef1db..d21f555 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.8.2.1 2001/10/06 01:00:28 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); } } |