Private.this

Creates a new GPrivate. If destructor is non-NULL, it is a pointer to a destructor function. Whenever a thread ends and the corresponding pointer keyed to this instance of GPrivate is non-NULL, the destructor is called with this pointer as the argument. Note destructor is used quite differently from notify in g_static_private_set(). Note A GPrivate can not be freed. Reuse it instead, if you can, to avoid shortage, or use GStaticPrivate. Note This function will abort if g_thread_init() has not been called yet.

  1. this(GPrivate* gPrivate)
  2. this(GDestroyNotify destructor)
    class Private

Parameters

destructor GDestroyNotify

a function to destroy the data keyed to GPrivate when a thread ends.

Throws

ConstructionException GTK+ fails to create the object.

Meta