Method

GLibPrivatereplace

Declaration

void
g_private_replace (
  GPrivate* key,
  gpointer value
)

Description

Sets the thread local variable key to have the value value in the current thread.

This function differs from g_private_set() in the following way: if the previous value was non-NULL then the GDestroyNotify handler for key is run on it.

Available since:2.32

Parameters

value gpointer
 

The new value.

 The argument can be NULL.
 The data is owned by the caller of the function.