Unregister a GType

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
(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?


PD. Code can be found at:

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]