Glib interface: dbus_g_object_type_install_info()

Claessens Xavier x_claessens at skynet.be
Tue Nov 8 03:15:12 PST 2005


On lun, 2005-11-07 at 21:58 +0100, Claessens Xavier wrote:
> On lun, 2005-11-07 at 14:50 -0500, John (J5) Palmieri wrote:
> > On Mon, 2005-11-07 at 20:00 +0100, Claessens Xavier wrote:
> > > I begin to understand the problem. I think dbus-glib miss a function
> > > like:
> > > 
> > > void
> > > dbus_g_object_type_uninstall_info (GType object_type,
> > > 				 const DBusGObjectInfo *info)
> > > {
> > >   g_return_if_fail (G_TYPE_IS_CLASSED (object_type));
> > > 
> > >   _dbus_g_value_types_init ();
> > > 
> > >   g_type_set_qdata (object_type,
> > > 		    dbus_g_object_type_dbus_metadata_quark (),
> > > 		    NULL);
> > > }
> > > 
> > > To add in dbus-gobject.c at line 1534 (dbus version 0.50)
> > > 
> > 
> > Can you send a patch?  Thanks.
> > 
> That's not enough because _dbus_g_value_types_init() calls a lot
> g_type_set_qdata(). I'm not a DBUS specialist (I just use it for a
> couple of days) so I'm not able to make a proper patch. And there is
> maybe already a solution that I don't know... So i'm waiting for expert
> advice.
> 
I'm reading the glib interface code... I've never seen any cleanup
code ! For example in func dbus_g_type_specialized_init() a g_hash_table
is created and NEVER destroyed ! So if I want to unload my plugin it
will for sure lead to a big memory leak (if not segfault) ! that's not
serious... for each *_init() it should be a *_close().

I'm trying to make a patch, but i don't know how i'll test it without
breaking my ubuntu breezy dbus package...

Maybe I missed something, if so please tell me ;-)

Thanks,
Xavier Claessens.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/dbus/attachments/20051108/6c975125/attachment.pgp


More information about the dbus mailing list