On Sat, Jan 03, 2004 at 09:13:15PM -0800, Daniel Rogers wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > | Dont forget to always chain up in any dispose or finalize routines... > | > | eg > | > | static void > | finalize(GObject *gobject) > | { > | > | blah ... blah > | > | G_OBJECT_CLASS(parent_class)->finalize(gobject); > | } > > Didn't know I had to chain up on finalize and dispose, though it makes > sense. The glib happy way of chaining up btw, is: > > static void > finalize (GObject * gobject) > { > ~ blah ... blah > ~ G_OBJECT_CLASS (g_type_class_peek_parent (GEGL_NAME_GET_CLASS > (gobject) )->finalize(gobject); > } Actually, the common idiom is to define: parent_class = g_type_class_peek_parent (class); in class_init, with parent_class being a static at file scope. Then you just use it as Calvin did whenever you need to chain up. Less code clutter that way. -Manish