kotlin / 1.7.0 / api / latest / jvm / stdlib / kotlinx.cinterop / alloc.html /

alloc

Platform and version requirements: Native (1.3)
fun <reified T : CVariable> NativePlacement.alloc(): T

Allocates variable of given type.

Parameters

T - must not be abstract

Platform and version requirements: Native (1.3)
inline fun <reified T : CVariable> NativePlacement.alloc(
    initialize: T.() -> Unit
): T

Allocates variable of given type and initializes it applying given block.

Parameters

T - must not be abstract

Platform and version requirements: Native (1.3)
fun <T : Boolean> NativePlacement.alloc(
    value: T
): BooleanVarOf<T>

Allocates variable with given value type and initializes it with given value.

© 2010–2022 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlinx.cinterop/alloc.html