[K/N] Remove deprecated deinitRuntimeIfNeeded #KT-65532
This commit is contained in:
committed by
Space Team
parent
3469e3b198
commit
dd89efbce2
@@ -86,7 +86,7 @@ void launchMain() {
|
||||
}
|
||||
|
||||
// TODO: Can we shutdown runtime here?
|
||||
Kotlin_deinitRuntimeIfNeeded();
|
||||
deinitRuntimeIfNeeded();
|
||||
}
|
||||
|
||||
void* entry(void* param) {
|
||||
|
||||
@@ -196,7 +196,7 @@ RUNTIME_NOTHROW void Kotlin_initRuntimeIfNeeded() {
|
||||
}
|
||||
}
|
||||
|
||||
void Kotlin_deinitRuntimeIfNeeded() {
|
||||
void deinitRuntimeIfNeeded() {
|
||||
if (isValidRuntime()) {
|
||||
deinitRuntime(::runtimeState, false);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ struct InitNode {
|
||||
|
||||
// For experimental MM, if runtime gets initialized, it will be in the native state after this.
|
||||
RUNTIME_NOTHROW void Kotlin_initRuntimeIfNeeded();
|
||||
void Kotlin_deinitRuntimeIfNeeded();
|
||||
void deinitRuntimeIfNeeded();
|
||||
|
||||
// Can only be called once.
|
||||
// No new runtimes can be initialized on any thread after this.
|
||||
|
||||
@@ -19,13 +19,6 @@ import kotlin.native.internal.ReportUnhandledException
|
||||
@Deprecated("Initializing runtime is not possible in the new memory model.", level = DeprecationLevel.WARNING)
|
||||
external public fun initRuntimeIfNeeded(): Unit
|
||||
|
||||
/**
|
||||
* Deinitializes Kotlin runtime for the current thread, if was inited.
|
||||
* Cannot be called from Kotlin frames holding references, thus deprecated.
|
||||
*/
|
||||
@GCUnsafeCall("Kotlin_deinitRuntimeIfNeeded")
|
||||
@Deprecated("Deinit runtime can not be called from Kotlin", level = DeprecationLevel.ERROR)
|
||||
external public fun deinitRuntimeIfNeeded(): Unit
|
||||
|
||||
/**
|
||||
* Exception thrown when top level variable is accessed from incorrect execution context.
|
||||
|
||||
Reference in New Issue
Block a user