[Pyrex] Re: __dealloc__ (was: Problems with pyrex and glib)

Toby tobia.conforto at linux.it
Tue Jan 10 10:51:29 CET 2006


Drirr wrote:
> 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?

I don't think you can rely on that.

Suppose module A defines type A.a and module B type B.b
Now suppose module A has a global object of type B.b and module B,
during execution, comes to have a global object of type A.a

No matter which one of them gets destroyed first, it will happen before
all external references to types defined in its own module are destroyed.

I think you need to patch the C code, if you want to put your global
dealloc in the right place. 


Toby

-- 
Pascal is for building pyramids—imposing, breathtaking structures
built by armies pushing heavy blocks into place.
Lisp is for building organisms . . .		—Alan Perlis



More information about the Pyrex mailing list