WeakValue

class WeakValue(pointer: <Error class: unknown class><<Error class: unknown class>>)

JSCWeakValue represents a weak reference to a value in a #JSCContext. It can be used to keep a reference to a JavaScript value without protecting it from being garbage collected and without referencing the #JSCContext either.

Skipped during bindings generation

  • method value: Property has no getter nor setter

Constructors

Link copied to clipboard
constructor(value: Value)

Create a new #JSCWeakValue for the JavaScript value referenced by @value.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val javascriptcoreWeakValuePointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun connectCleared(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

This signal is emitted when the JavaScript value is destroyed.

Link copied to clipboard

Get a #JSCValue referencing the JavaScript value of @weak_value.