Mark Dickinson <dicki...@gmail.com> added the comment:

Have you tried doing a "gc.get_referrers" on your weakref, to verify that there 
aren't any references that you don't expect to be there?

Another diagnostic would be to run with cyclic garbage collection disabled (via 
gc.disable). If you're seeing different behaviour with gc disabled versus 
enabled, that would at least confirm the presence of reference cycles.

> Are local variables/stack frames cleaned lazily? Is the last accessed
> value of a dictionary cached internally, increasing its reference count?

My knowledge of current Python internals isn't as deep as it used to be, but 
I'd be quite surprised if either of these were true.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43383>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to