Re: BonoboXObject refcounting
- From: Michael Meeks <michael ximian com>
- To: Martin Baulig <martin home-of-linux org>
- Cc: gnome-components-list gnome org
- Subject: Re: BonoboXObject refcounting
- Date: Mon, 16 Apr 2001 22:28:40 -0400 (EDT)
Hi Martin,
On 16 Apr 2001, Martin Baulig wrote:
> while trying to port Bonobo to glib HEAD this weekend I found the
> following in BonoboXObject:
BonoboXObject does very hackish things with the type system and
the ORB internals, it will not port to GObject without some considerable
work and thought I'm sure.
One simple way to remove the issue is to separate the CORBA_Object
from the BonoboXObject structure - this was a bad idea anyway - it just
appealed to me at the time for some reason I cannot fathom.
This would get rid of a chunk of the ugliest code in there,
including the finalize hack.
> IMHO this is already extremely ugly and hackish with GTK+ 1.x and just
> wrong with GObject. With GObject, you cannot "block" the finalizing of
> an object; this means, once the "finalize" method of a GObject is
> called, this object _will_ go away after the finalizing handler
> returns.
Dude !? I don't quite understand what you mean by "you can't just
block it". Unless things are substantialy different, you can simply
override the finalize method and refuse to chain to your parent - just
like with GtkObject, which is essentialy what we do - keeping the
GtkObject around until the ORB doesn't need it anymore.
> This is still not very nice, but it seems to work. Better ideas are
> very welcome, I'm still a bit confused how this whole refcounting
> stuff in Bonobo works.
It is a matter of there being two ref counts, and syncing the
ORB's count with the bonobo count to try and cause less confusion overall.
Either way, my preferred solution is to split the CORBA_Object reference
out of BonoboXObject.
Regards,
Michael.
--
mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]