> If that a fundamental restriction, or is that done only to not waste 8 bytes > for a pointer to the actual finalizer in each instance?
It used to be the case that we really wanted to save these 8 bytes but now if we map them to destructors, it's quite a fundamental restriction. > Of course we can solve this easily when we give the proxy object a boolean > field indicating if the finalizer shall really free the gtk object or just do > nothing. Seems to be a good solution. > I assume that the restriction to one module is because the compiler can not > ensure that always the same function is used as finalizer for instances of an > object if the finalizer proc lives in a different module? At some point we need to know how to generate code for these things and delaying code generation "until the full program has been analysed" is a bad, non-modular design that would hurt us hard very soon once incremental recompilations materialize. > This is indeed no serious restriction, I can simple copy the gobject > finalizer proc into each module that uses subclasses of gobject. Good, I'm glad my research prototype is becoming production ready. :-)
