TrashStack

class TrashStack(val glibTrashStackPointer: <Error class: unknown class><<Error class: unknown class>>) : ProxyInstance(source)

⚠️ Deprecated ⚠️

This is deprecated since version 2.48.

GTrashStack is deprecated without replacement

---

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.

Skipped during bindings generation

  • parameter stack_p: Unsupported pointer-to-pointer cType GTrashStack**

  • parameter stack_p: Unsupported pointer-to-pointer cType GTrashStack**

  • parameter stack_p: Unsupported pointer-to-pointer cType GTrashStack**

  • parameter stack_p: Unsupported pointer-to-pointer cType GTrashStack**

Constructors

Link copied to clipboard
constructor()

Allocate a new TrashStack.

constructor(scope: <Error class: unknown class>)

Allocate a new TrashStack using the provided AutofreeScope.

constructor(next: TrashStack?)

Allocate a new TrashStack.

constructor(next: TrashStack?, scope: <Error class: unknown class>)

Allocate a new TrashStack using the provided AutofreeScope.

constructor(glibTrashStackPointer: <Error class: unknown class><<Error class: unknown class>>)

Properties

Link copied to clipboard
val glibTrashStackPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val handle: <Error class: unknown class>
Link copied to clipboard

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

Functions

Link copied to clipboard
open override fun addCleaner(cleaner: <Error class: unknown class>): Boolean

Registers a cleaner to be executed when this proxy object is garbage collected.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Compare two proxy instances for equality. This will compare both the type of the instances, and their memory addresses.

Link copied to clipboard
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun removeCleaner(cleaner: <Error class: unknown class>): Boolean

Removes a previously registered cleaner from this proxy object.

Link copied to clipboard
open override fun toString(): String