allocateArray

actual fun <S : CloseableStruct> StructLayout<S>.allocateArray(count: Int, initialize: S.(Int) -> Unit): StructArray<S>?(source)

Allocates a contiguous array, composed of count element of type S.

The allocated memory isn't guaranteed to be zeroized, so it is important to initialize all the members of a given instance S.

If the allocation fails because not enough memory is available, then null is returned instead.

expect fun <S : CloseableStruct> StructLayout<S>.allocateArray(count: Int, initialize: S.(Int) -> Unit): StructArray<S>?(source)

Allocates a contiguous array, composed of count element of type S.

The allocated memory isn't guaranteed to be zeroized, so it is important to initialize all the members of a given instance S.

If the allocation fails because not enough memory is available, then null is returned instead.

actual fun <S : CloseableStruct> StructLayout<S>.allocateArray(count: Int, initialize: S.(Int) -> Unit): StructArray<S>?(source)

Allocates a contiguous array, composed of count element of type S.

The allocated memory isn't guaranteed to be zeroized, so it is important to initialize all the members of a given instance S.

If the allocation fails because not enough memory is available, then null is returned instead.

actual fun <S : CloseableStruct> StructLayout<S>.allocateArray(count: Int, initialize: S.(Int) -> Unit): StructArray<S>?(source)

Allocates a contiguous array, composed of count element of type S.

The allocated memory isn't guaranteed to be zeroized, so it is important to initialize all the members of a given instance S.

If the allocation fails because not enough memory is available, then null is returned instead.

actual fun <S : CloseableStruct> StructLayout<S>.allocateArray(count: Int, initialize: S.(Int) -> Unit): StructArray<S>?(source)

Allocates a contiguous array, composed of count element of type S.

The allocated memory isn't guaranteed to be zeroized, so it is important to initialize all the members of a given instance S.

If the allocation fails because not enough memory is available, then null is returned instead.