gpointer g_object_dup_qdata ( GObject* object, GQuark quark, GDuplicateFunc dup_func, gpointer user_data )
This is a variant of
g_object_get_qdata() which returns
a ‘duplicate’ of the value.
dup_func defines the
meaning of ‘duplicate’ in this context, it could e.g.
take a reference on a ref-counted object.
quark is not set on the object then
will be called with a
dup_func is called while user data of
This function can be useful to avoid races when multiple threads are using object data on the same key on the same object.