Cancel construction of GObject
- From: Jaroslav Šmíd <jardasmid gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Cancel construction of GObject
- Date: Sat, 27 Nov 2010 12:14:39 +0100
Is it possible to "cancel" construction in gobject-derived class?
Lets say I have GMyObject derived from GObject. In its init function I
need to spawn a thread. When that fails, I would like to cancel
construction of the object (so that gobjectclass' finalize function
would be called on the object and g_object_new would return null-pointer).
I know I can create extra function, which would call g_type_new and
spawn the thread then and destroy the object if it fails, but I would
like my object to be instantiable by g_object_new and not force user to
call extra initialization function and destroy the object if it fails.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]