Mercurial > cpython-lru_cache-weakref
diff Objects/stringobject.c @ 14018:0d805e239d8f legacy-trunk
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.
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Wed, 16 Aug 2000 23:41:01 +0000 |
| parents | 59f8cedcf049 |
| children | 6f6f965c5e2d |
line wrap: on
line diff
--- a/Objects/stringobject.c Wed Aug 16 23:03:57 2000 +0000 +++ b/Objects/stringobject.c Wed Aug 16 23:41:01 2000 +0000 @@ -2850,6 +2850,18 @@ #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
