summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclObj.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ae8228e..9344b86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-08-07 Miguel Sofer <msofer@users.sourceforge.net>
+
+ * generic/tclObj.c (Tcl_NewObj): added conditional code for
+ USE_THREAD_ALLOC; objects allocated through Tcl_NewObj() were
+ otherwise being leaked. [Bug 587488] reported by Sven Sass.
+
2002-08-06 Daniel Steffen <das@users.sourceforge.net>
* generic/tclInt.decls:
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 78581f2..2c5b468 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclObj.c,v 1.35 2002/08/05 03:24:41 dgp Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.36 2002/08/07 14:25:01 msofer Exp $
*/
#include "tclInt.h"
@@ -523,6 +523,8 @@ Tcl_NewObj()
Tcl_MutexLock(&tclObjMutex);
#ifdef PURIFY
objPtr = (Tcl_Obj *) Tcl_Ckalloc(sizeof(Tcl_Obj));
+#elif defined(TCL_THREADS) && defined(USE_THREAD_ALLOC)
+ objPtr = TclThreadAllocObj();
#else
if (tclFreeObjList == NULL) {
TclAllocateFreeObjects();