Klasse TrashStack

Alle implementierten Schnittstellen:
PointerInterface

public class TrashStack extends Record
A `GTrashStack` is an efficient way to keep a stack of unused allocated
memory chunks. Each memory chunk is required to be large enough to hold
a `gpointer`. This allows the stack to be maintained without any space
overhead, since the stack pointers can be stored inside the memory chunks.

There is no function to create a `GTrashStack`. A `NULL` `GTrashStack*`
is a perfectly valid empty stack.

Each piece of memory that is pushed onto the stack is cast to a
`GTrashStack*`.

There is no longer any good reason to use `GTrashStack`. If you have
extra pieces of memory, `free()` them and allocate them again later.

https://docs.gtk.org/glib/struct.TrashStack.html

  • Felddetails

    • NEXT

      public static final String NEXT
      pointer to the previous element of the stack,
      gets stored in the first `sizeof (gpointer)`
      bytes of the element
      Siehe auch:
  • Konstruktordetails

    • TrashStack

      public TrashStack(PointerContainer pointer)
    • TrashStack

      public TrashStack()
  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • setFieldNext

      public void setFieldNext(TrashStack next)
      pointer to the previous element of the stack,
      gets stored in the first `sizeof (gpointer)`
      bytes of the element
    • getFieldNext

      public TrashStack getFieldNext()
      pointer to the previous element of the stack,
      gets stored in the first `sizeof (gpointer)`
      bytes of the element