On Wed, Oct 14, 2009 at 02:16:35PM -0600, Neil Schemenauer wrote:
> The procedure implemented by http://bugs.python.org/issue812369
> seems to be a better idea.

After some experimentation I realize this idea is not ready yet.
The main problem comes from references to Python objects that
modules keep but don't expose to the garbage collector. For example,
gcmodule.c has a static pointer "tmod" that is a reference to the
"time" module. This reference prevents the "time" module from being
freed during interpreter shutdown.

Ideally, I suppose modules should be treated like any other object
and have tp_traverse and tp_clear methods that deal with these sorts
of pointers. They would have to delegated to the instance since each
module would have its own implementation.

  Neil
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
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