kotlin-stdlib / kotlinx.cinterop / memScoped memScoped Native 1.3 inline fun < R > memScoped ( block : MemScope . ( ) -> R ) : R (source) Runs given block providing allocation of memory which will be automatically disposed at the end of this scope.