[Python-bugs-list] Reuben Sumner: Py_REF_COUNT (PR#43)

guido@CNRI.Reston.VA.US guido@CNRI.Reston.VA.US
Fri, 30 Jul 1999 13:53:02 -0400 (EDT)

------- Forwarded Message

Date:    Tue, 20 Jul 1999 10:53:34 +0300
From:    Reuben Sumner <rasumner@iname.com>
To:      guido@python.org
Subject: Py_REF_COUNT

I posted a message through DejaNews which didn't seem to propogate (at
least it didn't reach here).

Try the following in a Python with Py_REF_DEBUG but without Py_TRACE_REFS

class C:
	def __init__(self): pass

while 1:

Stop it after a while and look at the reference count printed!  Python
is not actually using all that memory though.  With Py_TRACE_REFS things
are ok.  I can't figure it out.  The class instance dealloc routine is rather

With Py_TRACE_REFS some code of mine is doing some really bizarre things
but I would rather deal with one thing at a time.

Python version is 1.5.2 (tried on at least two platforms, both using gcc)

Many thanks,


------- End of Forwarded Message