All Downloads are FREE. Search and download functionalities are using the official Maven repository.

godot.core.memory.GodotWeakReference.kt Maven / Gradle / Ivy

There is a newer version: 0.11.0-4.3
Show newest version
package godot.core.memory

import godot.core.KtObject
import godot.core.ObjectID
import java.lang.ref.ReferenceQueue
import java.lang.ref.WeakReference

internal class GodotWeakReference(
    binding: GodotBinding,
    queue: ReferenceQueue,
    val id: ObjectID
) : WeakReference(binding, queue)


internal class GodotBinding {
    internal var wrapper: KtObject? = null
    internal var scriptInstance: KtObject? = null

    val value: KtObject?
        get() = scriptInstance?: wrapper
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy