Re: [gnome-db]GdaConnectionPoolClass parent class
- From: Reinhard Mueller <reinhard mueller bytewise at>
- To: javaguy gnue org
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db]GdaConnectionPoolClass parent class
- Date: Mon, 28 May 2001 21:18:42 +0200
Ian D . Stewart wrote:
Ok, as some of you know, I've been working on cleaning up the handling of
GObject v. GtkObject in libgda. Right now I'm looking at
gda-connection-pool.h. Specifically, I'm looking at the structure of
GdaConnectionPoolClass, and I've come across the following code:
#ifdef HAVE_GOBJECT
GObjectClass parent_class;
GObjectClass *parent;
#else
GtkObjectClass parent_class;
#endif
I'm assuming the duplication of parent and parent_class is an error. If not,
and there is some reasoning behind this, please let me know.
For now, I intend to replace the above code with:
GdaObjectClass parent_class;
There was a reason for this.
GObjectClass parent_class; is to incorporate all fields of the parent class.
GObjectClass *parent; is a pointer to the instance of the class object
of the parent class. This is used so that the "inherited" finalize
method can be called from this class's finalize method.
Other objects don't have this because they have no own finalize method.
I am not 100% sure if this is the "right" method to do it. Members of
the gtk list proposed creating a global variable, which is a thing i
don't like (i don't like global variables at all).
Whatever you do, please try to be clean with destroying/finalizing, as
memory holes will make libgda unusable for production systems.
Thanks,
--
Reinhard Mueller
GNU Enterprise project
http://www.gnue.org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]