This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author James.Bowman
Recipients James.Bowman
Date 2010-10-20.04:01:44
SpamBayes Score 0.0003204969
Marked as misclassified No
Message-id <1287547307.96.0.164615718741.issue10150@psf.upfronthosting.co.za>
In-reply-to
Content
import sys

def foo():
    x = [o] * 100
    raise ArithmeticError

o = "something"
print sys.getrefcount(o)
try:
    foo()
except ArithmeticError:
    pass
print sys.getrefcount(o)

-------------------------------------------

Gives:

4
104


Looking at the CPython source, FrameObject's deallocator does actually decrement refcounts of its locals and arguments.  Guessing that the FrameObject is not being deallocated.
History
Date User Action Args
2010-10-20 04:01:48James.Bowmansetrecipients: + James.Bowman
2010-10-20 04:01:47James.Bowmansetmessageid: <1287547307.96.0.164615718741.issue10150@psf.upfronthosting.co.za>
2010-10-20 04:01:45James.Bowmanlinkissue10150 messages
2010-10-20 04:01:44James.Bowmancreate