Make cleanable trace-log not closed OpenGL objects

This commit is contained in:
DBotThePony 2022-09-16 01:01:43 +07:00
parent 023995c7f6
commit 4198483974
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -216,8 +216,8 @@ class GLStateTracker {
var cleanManual = false
val cleanable = cleaner.register(ref) {
if (!cleanManual)
LOGGER.error("{} with ID {} was GC'd by JVM, but it should have been removed manually.", name, nativeRef)
if (!cleanManual && LOGGER.isTraceEnabled)
LOGGER.trace("{} with ID {} was GC'd by JVM, without manually calling close()", name, nativeRef)
synchronized(cleanerHits) {
cleanerHits.add {