[pypy-issue] [issue1269] weakref.WeakSet does not work correctly

Amaury Forgeot d Arc tracker at bugs.pypy.org
Thu Sep 27 09:41:51 CEST 2012


Amaury Forgeot d Arc <amauryfa at gmail.com> added the comment:

This is an assumed difference with CPython; PyPy does not use reference counting to manage 
memory.

See this paragraph about PyPy's garbage collector:
http://doc.pypy.org/en/latest/cpython_differences.html#differences-related-to-garbage-
collection-strategies
"""... It also means that weak references may stay alive for a bit longer than expected."""

You could add a call to gc.collect() to clear weak references, but of course this has a 
large performance impact.

----------
nosy: +afa
status: unread -> wontfix

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1269>
________________________________________


More information about the pypy-issue mailing list