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 gvanrossum
Recipients
Date 2006-12-28.00:40:19
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
I believe I've found a leak in the code that adds annotations to a function object. See this session:

>>> x = object()
>>> import sys
>>> sys.getrefcount(x)
2
>>> for i in range(100):
...  def f(x: x): pass
...
>>> del f
>>> sys.getrefcount(x)
102
>>>

At first I thought this could be due to the code added to the MAKE_FUNCTION opcode, but I don't see a leak there. More likely func_annotations is not being freed when a function object is deleted.
History
Date User Action Args
2007-08-23 15:55:33adminlinkissue1607548 messages
2007-08-23 15:55:33admincreate