Andrew Collette wrote: > Is the GIL guaranteed to be held when __dealloc__ is called? In other > words, is it safe to call into Python?
Yes, the GIL is held, and you can call into Python, but don't expose the object being deallocated to any other Python code, because it may contain object references that are no longer valid. > Alternatively, is there another (safer) method I can use for extension > types, analagous to Python's __del__ method? No, there's no __del__ for extension types, unfortunately. -- Greg _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
