Schnittstelle TypeValueTable.OnTypeValueFreeFunc

Umschließende Klasse:
TypeValueTable
Funktionsschnittstelle:
Dies ist eine funktionale Schnittstelle, die somit als Zuweisungsziel für einen Lambdaausdruck oder eine Methodenreferenz verwendet werden kann.

@FunctionalInterface public static interface TypeValueTable.OnTypeValueFreeFunc
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    Frees any old contents that might be left in the `value->data` array of
    the given value.
  • Methodendetails

    • onTypeValueFreeFunc

      void onTypeValueFreeFunc(CallbackHandler __self, @Nonnull Value 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:
      <!-- language="C" -->
       // 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);
       
      Parameter:
      value - the value to free