summaryrefslogtreecommitdiffstats
path: root/generic/tclThread.c
diff options
context:
space:
mode:
authorsebres <sebres@noemail.net>2014-04-22 13:25:41 (GMT)
committersebres <sebres@noemail.net>2014-04-22 13:25:41 (GMT)
commitcdc04b3ac91227d4f593c5b5faa48c89c8ac2c3e (patch)
tree8c753402e4e14c2e9ce0d04c5bb6ef9ed65b565f /generic/tclThread.c
parent09f564c25c7ac7a69ea6b2f10690d66281f9ff7a (diff)
downloadtcl-cdc04b3ac91227d4f593c5b5faa48c89c8ac2c3e.zip
tcl-cdc04b3ac91227d4f593c5b5faa48c89c8ac2c3e.tar.gz
tcl-cdc04b3ac91227d4f593c5b5faa48c89c8ac2c3e.tar.bz2
Memory leak after thread exit, fixed (alloc cache released by exit), belong to ticket [3493120]
FossilOrigin-Name: c251d61424e28ee353f336c22c79630d3193df89
Diffstat (limited to 'generic/tclThread.c')
-rw-r--r--generic/tclThread.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclThread.c b/generic/tclThread.c
index 8384107..d6b5bcb 100644
--- a/generic/tclThread.c
+++ b/generic/tclThread.c
@@ -338,8 +338,9 @@ Tcl_ConditionFinalize(
*
* TclFinalizeThreadData --
*
- * This function cleans up the thread-local storage. This is called once
- * for each thread.
+ * This function cleans up the thread-local storage. Secondary, it cleans
+ * thread alloc cache.
+ * This is called once for each thread before thread exits.
*
* Results:
* None.
@@ -354,6 +355,9 @@ void
TclFinalizeThreadData(void)
{
TclpFinalizeThreadDataThread();
+#if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC)
+ TclFinalizeThreadAllocThread();
+#endif
}
/*