summaryrefslogtreecommitdiffstats
path: root/Objects/stringobject.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2000-08-16 23:41:01 (GMT)
committerBarry Warsaw <barry@python.org>2000-08-16 23:41:01 (GMT)
commit4df762ff98d2b7c21c2fcef922812844eb401650 (patch)
tree4b9f70a9da5ecfbff83abab4dd19958b6e21d4e1 /Objects/stringobject.c
parentf2581c97f202c35886e649bacccef1a46ed5dd2b (diff)
downloadcpython-4df762ff98d2b7c21c2fcef922812844eb401650.zip
cpython-4df762ff98d2b7c21c2fcef922812844eb401650.tar.gz
cpython-4df762ff98d2b7c21c2fcef922812844eb401650.tar.bz2
Insure properly identifies the `interned' dictionary as leaking at
shutdown time, but CVS log entry for revision 2.45 explains why this is so. Simply include a comment so we don't have to re-figure it out again 5 years from now.
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r--Objects/stringobject.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 6d25ddb..25621c2 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -2850,6 +2850,18 @@ PyString_Format(PyObject *format, PyObject *args)
#ifdef INTERN_STRINGS
+/* This dictionary will leak at PyString_Fini() time. That's acceptable
+ * because PyString_Fini() specifically frees interned strings that are
+ * only referenced by this dictionary. The CVS log entry for revision 2.45
+ * says:
+ *
+ * Change the Fini function to only remove otherwise unreferenced
+ * strings from the interned table. There are references in
+ * hard-to-find static variables all over the interpreter, and it's not
+ * worth trying to get rid of all those; but "uninterning" isn't fair
+ * either and may cause subtle failures later -- so we have to keep them
+ * in the interned table.
+ */
static PyObject *interned;
void