Re: Chaining of dispose and finalize



Russell Shaw wrote:
[...]
With lines like these to call the parent (i.e. GObject) functions in view_dispose():

G_OBJECT_CLASS (parent_class)->dispose (view);


But in view_class_init() above, i did: gobject_class->dispose=view_dispose,
so G_OBJECT_CLASS(parent_class)->dispose(view) will recursively call itself
forever.

and in view_finalize():

G_OBJECT_CLASS (parent_class)->finialize (view);


So will this.

I didn't see my last mail come through but here's my quote:

"the gobject code always keeps a version of the class intact
 (for quick reference at instantiation and for chaining)"

g_type_class_peek_parent() returns a pointer to the class structure that
is kept "intact", not the one that you overrided on your copy of that class.

HTH,
                           -Tristan






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