Re: newbie: doubt on GObject system
- From: Sven Neumann <sven gimp org>
- To: tarun webkadai com
- Cc: gtk-list gnome org
- Subject: Re: newbie: doubt on GObject system
- Date: Sun, 08 Jun 2003 23:46:50 +0200
Hi,
Tarun Ramakrishna Elankath <tarun webkadai com> writes:
> I am new to Gtk and have been reading up on GObject and GType. What I
> have failed to understand is why is it that the GTypeInfo structure
> fails to provide a field for instance finalizer functions ? We have
> fields for specifying class initialization, class finalization, instance
> initialization functions but *not* for instance finalization.
>
> For specifying an instance finalization function, one needs to
> assign it to the finalize member of the GObjectClass in the instance
> init function. And in addition, make sure that this user-defined
> finalization function also calls the finalize function of the parent
> class object.
>
> Is this the only way to do it ? Have I misunderstood something here ?
I think you understood the principles pretty well. Well, most people
assign the finalize method when the class is initialized, not in the
instance initializer.
Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]