utopia-rise / godot-kotlin-jvm

Godot Kotlin JVM Module
MIT License
585 stars 38 forks source link

Unbind Singletons before JVM closes #485

Closed CedNaru closed 1 year ago

CedNaru commented 1 year ago

Depends on #484

Godot does free its singletons when it terminates. The issue is that our module is terminated (and so the JVM) before the singletons are freed, which causes an error when we try to free the remaining JNI references inside singletons. This PR makes sure that singletons are unbound (without KtBinding) before the closing the JVM.

CedNaru commented 1 year ago

Adding a fix to a small error I just spotted from the previous PR