mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Improved new Py_TRACE_REFS gimmicks.
Arranged that all the objects exposed by __builtin__ appear in the list of all objects. I basically peed away two days tracking down a mystery leak in sys.gettotalrefcount() in a ZODB app (== tons of code), because the object leaking the references didn't appear in the sys.getobjects(0) list. The object happened to be False. Now False is in the list, along with other popular & previously missing leak candidates (like None). Alas, we still don't have a choke point covering *all* Python objects, so the list of all objects may still be incomplete.
This commit is contained in:
parent
a16b21fb0a
commit
7571a0fbcf
4 changed files with 54 additions and 21 deletions
|
@ -582,7 +582,7 @@ PyAPI_FUNC(void) _Py_NewReference(PyObject *);
|
|||
PyAPI_FUNC(void) _Py_ForgetReference(PyObject *);
|
||||
PyAPI_FUNC(void) _Py_Dealloc(PyObject *);
|
||||
PyAPI_FUNC(void) _Py_PrintReferences(FILE *);
|
||||
PyAPI_FUNC(void) _Py_AddToAllObjects(PyObject *);
|
||||
PyAPI_FUNC(void) _Py_AddToAllObjects(PyObject *, int force);
|
||||
|
||||
#else
|
||||
/* Without Py_TRACE_REFS, there's little enough to do that we expand code
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue