diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/Starbound.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/Starbound.kt index 2895ee5c..d74bef1c 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/Starbound.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/Starbound.kt @@ -233,23 +233,6 @@ class Starbound : ISBFileLocator { .maximumWeight(1_024L * 1_024L * 256L /* 256 МиБ */) .build() - init { - val ref = WeakReference(imageCache) - - val worker = Runnable { - while (true) { - val get = ref.get() ?: break - get.cleanUp() - LockSupport.parkNanos(1_000_000_000L) - } - } - - Thread(worker, "Image Data Cache Cleaner for $this").also { - it.isDaemon = true - it.start() - } - } - fun item(name: String): ItemStack { return ItemStack(items[name] ?: return ItemStack.EMPTY) } diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLStateTracker.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLStateTracker.kt index d7fdc1e7..f57ce4e2 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLStateTracker.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLStateTracker.kt @@ -442,26 +442,6 @@ class GLStateTracker(val client: StarboundClient) { .weakValues() .build() - init { - val ref0 = WeakReference(named2DTextures0) - val ref1 = WeakReference(named2DTextures1) - - val worker = Runnable { - while (true) { - val get0 = ref0.get() ?: break - get0.cleanUp() - val get1 = ref1.get() ?: break - get1.cleanUp() - LockSupport.parkNanos(1_000_000_000L) - } - } - - Thread(worker, "OpenGL Texture Cache Cleaner for $this").also { - it.isDaemon = true - it.start() - } - } - private val missingTexture: GLTexture2D by lazy { newTexture(missingTexturePath).upload(client.starbound.readDirect(missingTexturePath), GL_RGBA, GL_RGBA).generateMips().also { it.textureMinFilter = GL_NEAREST