5.14 GTypeValueFreeFunc

Callback: GTypeValueFreeFunc

A procedure given for it is called as (procedure value).

Frees any old contents that might be left in the value->data array of the given value.

No resources may remain allocated through the <GValue> contents after this function returns. E.g. for our above string type:


// only free strings without a specific flag for static storage
if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS))
  g_free (value->data[0].v_pointer);
value

Passed: a <GValue>.

the value to free