[IronPython] Possible WeakReference leak in Ipy 2.6.1
Idan Zaltzberg
idan at cloudshare.com
Thu Oct 14 08:09:15 CEST 2010
opened
*From:* users-bounces at lists.ironpython.com [mailto:
users-bounces at lists.ironpython.com] *On Behalf Of *Dino Viehland
*Sent:* Wednesday, October 13, 2010 9:49 PM
*To:* Discussion of IronPython
*Subject:* Re: [IronPython] Possible WeakReference leak in Ipy 2.6.1
Yep, this definitely looks like an issue – could you open a bug? We should
probably have a check when adding which causes us to scan the list
occasionally and remove any dead types.
*From:* users-bounces at lists.ironpython.com [mailto:
users-bounces at lists.ironpython.com] *On Behalf Of *Idan Zaltzberg
*Sent:* Wednesday, October 13, 2010 6:48 AM
*To:* Discussion of IronPython
*Subject:* [IronPython] Possible WeakReference leak in Ipy 2.6.1
When definnning classes in a method that are subcallses, like:
def d():
class A(BaseType): pass
…
The new generated types is appended to the _subtypes weak reference list on
BaseType.
Looks like this list is only cleaned when RemoveSubType Is called, which
might never happen if I understand correctly.
Seems to me there should be a cleanup mechanism similar to WeakDictionary,
so the list can't grow to infinity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20101014/6cf83e49/attachment.html>
More information about the Ironpython-users
mailing list