godot.core.memory.NativeCoreBinding.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of godot-library-debug Show documentation
Show all versions of godot-library-debug Show documentation
Contains godot api as kotlin classes and jvm cpp interaction code.
package godot.core.memory
import godot.core.NativeCoreType
import godot.core.VariantParser
import java.lang.ref.ReferenceQueue
import java.lang.ref.WeakReference
internal class NativeCoreBinding(
ref: NativeCoreType,
val variantType: VariantParser
) : WeakReference(ref, queue) {
val ptr = ref._handle
companion object {
/** Queue to be notified when the GC runs on NativeCoreTypes.*/
val queue = ReferenceQueue()
}
}