Edoardo Luppi
08/03/2023, 10:02 AMzeroValue
without a memScoped
block?
I can't use memScoped
as allocated memory should be freed by Windows itself later in time.Edoardo Luppi
08/03/2023, 11:04 AMinternal inline fun <reified T : CVariable> NativePlacement.allocZeroed(): T {
val t = alloc<T>()
memset(t.ptr, 0, sizeOf<T>().convert())
return t
}