[Pyrex] __dealloc__ (was: Problems with pyrex and glib)
Drirr
miston.drirr at gmail.com
Mon Jan 9 22:50:10 CET 2006
Lenard Lindstrom wrote:
>On 9 Jan 2006 at 10:26, Simon Burton wrote:
>
>
>>On Sun, 08 Jan 2006 17:13:00 -0600
>>Drirr <miston.drirr at gmail.com> wrote:
>>
>>
>>>Now I have another question. Is there something similar to __dealloc__
>>>but for the whole module?
>>>
>>>
>>Use the __del__ method of a global singleton object.
>>
>>
>
>The singleton would have to be of a new style class, not an extension
>type, for __del__ to work. It also has to be assigned to a python
>variable. Also note that there is no good way to control when the
>__del__ method is called during the deallocation of the globals.
>
>
Migt be a silly question, but just to be sure. At least I can count on
the module globals getting destroyed after all external references to
types defined in the module get destroyed, right?
Drirr
More information about the Pyrex
mailing list