mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 02:54:04 +09:00
fixed a bug with dangling pointer on loadscreen
This commit is contained in:
@@ -23,6 +23,9 @@ open class BlockLayer(val width: Int, val height: Int) : Disposable {
|
||||
// using unsafe pointer gets you 100 fps, whereas using directbytebuffer gets you 90
|
||||
internal val ptr: UnsafePtr = UnsafeHelper.allocate(width * height * BYTES_PER_BLOCK)
|
||||
|
||||
val ptrDestroyed: Boolean
|
||||
get() = ptr.destroyed
|
||||
|
||||
init {
|
||||
ptr.fillWith(0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user