Class DualState.BBHeapFreeTuple<T>

Enclosing class:
DualState<T>

public abstract static class DualState.BBHeapFreeTuple<T> extends DualState.SingleGuardedBB<T>
A DualState subclass whose only native resource releasing action needed is heap_freetuple of the address of a direct byte buffer.
  • Constructor Details

    • BBHeapFreeTuple

      protected BBHeapFreeTuple(T referent, Lifespan span, ByteBuffer hftTarget)
  • Method Details

    • formatString

      public String formatString()
      Description copied from class: DualState.SingleGuardedBB
      Return a printf format string resembling "%s something(%s)" where the second %s will be the value being guarded; the "something" should indicate what the value represents, or what will be done with it when released by Java.
      Overrides:
      formatString in class DualState.SingleGuardedBB<T>
    • javaStateUnreachable

      protected void javaStateUnreachable(boolean nativeStateLive)
      When the Java state is released or unreachable, a heap_freetuple call is made so the native memory is released without having to wait for release of its containing context.
      Overrides:
      javaStateUnreachable in class DualState<T>
      Parameters:
      nativeStateLive - true is passed if the instance's "native state" is still considered live, that is, no lifespan callback has been invoked to stamp it invalid (nor has it been "adopted").