[issue7808] test_bsddb3 leaks references

Florent Xicluna report at bugs.python.org
Wed Mar 3 16:34:11 CET 2010


Florent Xicluna <florent.xicluna at gmail.com> added the comment:

> Could you explain the changes to the unittest?

The reference to "self" in the hooks were preventing the GC of the test case, as far as I understand, because it creates a cycle.
When using weak references, there's no more dead cycles.
It is my own explanation, maybe it's not exactly what happens.

For the sys.traceback, I could not explain it better than the FAQ:
http://docs.python.org/faq/design.html#how-does-python-manage-memory

I may add a small comment in test_replication to explain the usage of weakref.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7808>
_______________________________________


More information about the Python-bugs-list mailing list