ValueArray

constructor(nPrealloced: <Error class: unknown class>)(source)

⚠️ Deprecated ⚠️

This is deprecated since version 2.32.

Use #GArray and g_array_sized_new() instead.

---

Allocate and initialize a new #GValueArray, optionally preserve space for @n_prealloced elements. New arrays always contain 0 elements, regardless of the value of @n_prealloced.

Return

a newly allocated #GValueArray with 0 values

Parameters

nPrealloced

number of values to preallocate space for


constructor()(source)

Allocate a new ValueArray.

This instance will be allocated on the native heap and automatically freed when this class instance is garbage collected.


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

Allocate a new ValueArray using the provided AutofreeScope.

The AutofreeScope manages the allocation lifetime. The most common usage is with memScoped.

Parameters

scope

The AutofreeScope to allocate this structure in.


constructor(nValues: <Error class: unknown class>, values: Value?)(source)

Allocate a new ValueArray.

This instance will be allocated on the native heap and automatically freed when this class instance is garbage collected.

Parameters

nValues

number of values contained in the array

values

array of values


constructor(nValues: <Error class: unknown class>, values: Value?, scope: <Error class: unknown class>)(source)

Allocate a new ValueArray using the provided AutofreeScope.

The AutofreeScope manages the allocation lifetime. The most common usage is with memScoped.

Parameters

nValues

number of values contained in the array

values

array of values

scope

The AutofreeScope to allocate this structure in.


constructor(gobjectValueArrayPointer: <Error class: unknown class><<Error class: unknown class>>)(source)