GObject -- Initializing and finalizing



1) How can we set up a class finalizing function for static types?

The type system issues a warning when a class_finalize function is
specified during the registration of a static type.

However, I have class-wide resources that should be freed when the
instance ref count reaches zero -- to keep track of ref counts myself
seems silly, given that the type system already does that.

2) "Chaining up"

When we override the parent class finalizing function, do we always need
to store a pointer to the parent class?  Won't g_type_class_peek_parent()
return the parent class (negating the need to store a pointer)?

3) What is the use of the "gpointer data" parameter in class and instance
init/finalize functions?

-R




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