[K/N] Do not compile for deprecated targets and legacy MM
^KT-56533 ^KT-58853
This commit is contained in:
committed by
Space Team
parent
d1ce55cbd2
commit
aea8bac7d2
@@ -1,15 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
import kotlinx.cinterop.*
|
||||
import kotlin.native.Platform
|
||||
|
||||
fun enableMemoryChecker() {
|
||||
Platform.isMemoryLeakCheckerActive = true
|
||||
}
|
||||
|
||||
fun leakMemory() {
|
||||
StableRef.create(Any())
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "testlib_api.h"
|
||||
|
||||
#include <thread>
|
||||
|
||||
int main() {
|
||||
std::thread t([]() {
|
||||
testlib_symbols()->kotlin.root.enableMemoryChecker();
|
||||
testlib_symbols()->kotlin.root.leakMemory();
|
||||
});
|
||||
t.join();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user