Class-Scope Properties



Hello all,

I believe I've asked this question before but never got a definitive
answer.

Say you're creating a new class A derived from GObject.  This class
needs a property that has class scope; a.k.a, static scope in C++
classes.  In addition, this property is no simple built-in or
fundamental value but is itself an instance of another class B derived
from GObject.  Now, I'm fairly sure you would create the new instance of
the class B property in the class_init function for class A.

But where do you release it?  As far as I can tell, the finalize_class
function is only for plug-ins.  And debug_objects is reporting the
property as a stale reference when the program exits.

Thanks,
Eric.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]