How to find who is decref'ing Py_None on me!

Warren Postma embed at NOSPAM.geocities.com
Wed Aug 9 10:06:50 EDT 2000


(It's got to be Me, of course, but where in the C sources...)

I have an embedded/extended Python App in which the reference counts on
Py_None are creeping towards zero during program run, and I'd like to find
which DECREFs are causing it. Anybody done this and can tell me a good
debugging technique? there are literally thousands of these in the Python
1.5 sources, plus a few hundred in my own code.  Typically, I guess, it's
being decref'd because it's being returned as the result of a function, but
whoever is returning it is not incref'ing it first.  So that gets tricky to
find.  Ow.

Warren Postma





More information about the Python-list mailing list