Interface CacheDestroyFunc

All Superinterfaces:
FunctionPointer
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @Deprecated @Generated("org.javagi.JavaGI") public interface CacheDestroyFunc extends FunctionPointer
Deprecated.

Functional interface declaration of the CacheDestroyFunc callback.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run(@Nullable MemorySegment value)
    Deprecated.
    Use a GHashTable instead
    Deprecated.
    Creates a native function pointer to the upcall(MemorySegment) method.
    default void
    Deprecated.
    The upcall method is called from native code.
  • Method Details

    • run

      @Deprecated void run(@Nullable MemorySegment value)
      Deprecated.
      Use a GHashTable instead
      Specifies the type of the valueDestroyFunc and keyDestroyFunc functions passed to g_cache_new(). The functions are passed a pointer to the GCache key or GCache value and should free any memory and other resources associated with it.
      Parameters:
      value - the GCache value to destroy
    • upcall

      default void upcall(MemorySegment value)
      Deprecated.
      The upcall method is called from native code. The parameters are marshaled and run(MemorySegment) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Deprecated.
      Creates a native function pointer to the upcall(MemorySegment) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer