Hmm. Maybe deleting the object isn't triggering garbage collection? The problem is that Pyrex gives us very little control of Python reference deletion. When you use Pyrex, you just have to trust that it will clear the Python object references in a timely way, because it doesn't let you deal with that yourself. From the Pyrex docs:
Finalization method: __dealloc__ The counterpart to the __cinit__ method is the __dealloc__ method, which should perform the inverse of the __cinit__ method. Any C data structures that you allocated in your __cinit__ method should be freed in your __dealloc__ method. You need to be careful what you do in a __dealloc__ method. By the time your __dealloc__ method is called, the object may already have been partially destroyed and may not be in a valid state as far as Python is concerned, so you should avoid invoking any Python operations which might touch the object. In particular, don't call any other methods of the object or do anything which might cause the object to be resurrected. It's best if you stick to just deallocating C data. You don't need to worry about deallocating Python attributes of your object, because that will be done for you by Pyrex after your __dealloc__ method returns. Note: There is no __del__ method for extension types. --------------------------------- I'll try to enumerate the various places a reference to the sequence object might be held, in another email. -- Chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pygr-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pygr-dev?hl=en -~----------~----~----~----~------~----~------~--~---
