summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authormsofer <msofer@noemail.net>2002-08-07 14:24:54 (GMT)
committermsofer <msofer@noemail.net>2002-08-07 14:24:54 (GMT)
commita5c999089a5301f8d701f6fe3f4ac1133ff3c94d (patch)
tree67f46d928070e97788e9c9d22b48a7fb7dd8aaca /generic/tclObj.c
parent84d4cd02da78bdcd7191ec8c21812436bc6f48f3 (diff)
downloadtcl-a5c999089a5301f8d701f6fe3f4ac1133ff3c94d.zip
tcl-a5c999089a5301f8d701f6fe3f4ac1133ff3c94d.tar.gz
tcl-a5c999089a5301f8d701f6fe3f4ac1133ff3c94d.tar.bz2
* 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. FossilOrigin-Name: d6086ae38bc8a5c6865776cd63e6af2d7f6ed31b
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c4
1 files changed, 3 insertions, 1 deletions
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();