]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
When Py_TRACE_REFS is defined, a list of all live objects is maintained in
authorTim Peters <tim.peters@gmail.com>
Sun, 23 Mar 2003 02:51:01 +0000 (02:51 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 23 Mar 2003 02:51:01 +0000 (02:51 +0000)
commit78be7993b64958585bafdced0c86c06fde8155fb
tree74bebff154ab7cadac8356d6e8bde221a6af30c9
parent0529377cdfd6912a2450239c1b52ae53b09e1658
When Py_TRACE_REFS is defined, a list of all live objects is maintained in
a doubly-linked list, exposed by sys.getobjects().  Unfortunately, it's not
really all live objects, and it seems my fate to bump into programs where
sys.gettotalrefcount() keeps going up but where the reference leaks aren't
accounted for by anything in the list of all objects.

This patch helps a little:  if COUNT_ALLOCS is also defined, from now on
type objects will also appear in this list, provided at least one object
of a type has been allocated.
Misc/SpecialBuilds.txt
Objects/object.c