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.
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.