issue #26 resolved (someone is hoolding stale ingame context)

This commit is contained in:
minjaesong
2019-07-03 03:59:37 +09:00
parent a399d22dd1
commit c452be669b
27 changed files with 116 additions and 81 deletions

View File

@@ -1,5 +1,6 @@
package net.torvald
import net.torvald.terrarum.printStackTrace
import sun.misc.Unsafe
/**
@@ -57,7 +58,7 @@ class UnsafePtr(pointer: Long, allocSize: Long) {
UnsafeHelper.unsafe.freeMemory(ptr)
println("[UnsafePtr] Destroying pointer $this; called from:")
Thread.currentThread().stackTrace.forEach { println(it) }
printStackTrace(this)
destroyed = true
}