Native, old MM: fix releasing foreign refs to circular frozen graphs
^KT-49497
This commit is contained in:
committed by
Space
parent
b82c306530
commit
2bd53e3dea
@@ -896,6 +896,17 @@ fun testRememberNewObject(test: TestRememberNewObject) {
|
||||
assertNotEquals("", obj.toString()) // Likely crashes if object is removed.
|
||||
}
|
||||
|
||||
class KT49497Model {
|
||||
private class SelfRef(val self: KT49497Model)
|
||||
|
||||
// Wrapping `this` to make the strongly connected component non-trival, just in case:
|
||||
private val selfRef = SelfRef(this)
|
||||
|
||||
init {
|
||||
freeze()
|
||||
}
|
||||
}
|
||||
|
||||
open class ClassForTypeCheck
|
||||
|
||||
fun testClassTypeCheck(x: Any) = x is ClassForTypeCheck
|
||||
|
||||
Reference in New Issue
Block a user