Unregister a GType
- From: Luis Lopez <luis lopez cuarentaydos com>
- To: gtk-app-devel-list gnome org
- Subject: Unregister a GType
- Date: Thu, 20 May 2010 10:07:10 +0200
Hi list,
I'm developing an application with plugin support. One of the plugins
registers a GType (EinaAdb) but if I load, unload, and finally reload it
I get some messages and my app crashes or freezes.
Messages are:
(eina:28412): GLib-GObject-WARNING **: cannot register existing type
`EinaAdb'
(eina:28412): GLib-CRITICAL **: g_once_init_leave: assertion
`initialization_value != 0' failed
(eina:28412): GLib-GObject-CRITICAL **: g_object_new: assertion
`G_TYPE_IS_OBJECT (object_type)' failed
I understand why this messages appear: I'm registering a GType when the
plugin is initialized, after reloading it I'm re-registering an existing
type, obviously it fails.
The question is: there is any way to unregister a type or its imposible
for a loadable module to register new types?
Thanks!
PD. Code can be found at:
http://github.com/xuzo/eina/blob/plugin-subsystem/plugins/adb/eina-adb.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]