W3cubDocs

/Kotlin

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

© 2010–2020 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