On 1/10/07, Robert Kern <[EMAIL PROTECTED]> wrote:

Charles R Harris wrote:

> Is there a reason that the pointer PyArray_API remains valid if the
> imported numpy module is garbage collected? Or is the imported module
> persistent even though the returned object goes away? I assume that
> python did a dlopen somewhere.

There is no provision in Python for safely unloading a C extension module,
so we
simply presume that sys.modules always holds a reference to the imported
module
and doesn't let it get garbage collected. People who futz with that get
the
segfaults they deserve.  ;-)


Ah, so that's why reload fails for C extension modules. Can't let the links
change either.

Chuck
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to