[Python-Dev] Generator finalization and reference cycles

2013年4月26日 15:29:41 -0700

Hello,
I have proposed a new generator finalization scheme in
http://bugs.python.org/issue17807: it removes the tp_del from
generator objects, instead electing to cleanup the generator
(equivalent of calling close()) in the frame's tp_clean function. This
way, generators with a try / finally block can be finalized even when
they are part of reference cycles.
This has stemmed from http://bugs.python.org/issue17468, which mentions
a memory leak in Django due to uncollectable generators.
Feedback welcome.
Regards
Antoine.
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to