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. ;-) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion