Re: Cancel construction of GObject



On Sat, 27 Nov 2010 12:14:39 +0100
Jaroslav ÅmÃd <jardasmid gmail com> wrote:

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).

Have a look at the GInitable and GAsyncInitable interfaces.

  - Jannis


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