[Cython] __del__ not called on Python exit
Stephane DROUARD
stephane.drouard at st.com
Thu Nov 27 18:29:22 CET 2008
Hi,
With the following file "foo.py":
class Foo:
def __init__(self):
print "__init__"
def __del__(self):
print "__del__"
foo = Foo()
del foo
foo = Foo()
> python -c "import foo"
__init__
__del__
__init__
__del__
When foo.py is Cythonized (0.10.2):
> python -c "import foo"
__init__
__del__
__init__
__del__ is not called when the Python exits.
I tried using "--cleanup 1", but it hangs, trying to write at address 0...
Cheers,
Stephane
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: foo.py
Url: http://codespeak.net/pipermail/cython-dev/attachments/20081127/4e40cab1/attachment.diff
More information about the Cython-dev
mailing list