WeakValue

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.

Constructors

this
this(JSCWeakValue* jSCWeakValue, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(Value value)

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

Members

Functions

addOnCleared
gulong addOnCleared(void delegate(WeakValue) dlg, ConnectFlags connectFlags)

This signal is emitted when the JavaScript value is destroyed.

getStruct
void* getStruct()

the main Gtk struct as a void*

getValue
Value getValue()

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

getWeakValueStruct
JSCWeakValue* getWeakValueStruct(bool transferOwnership)

Get the main Gtk struct

Static functions

getType
GType getType()

Variables

jSCWeakValue
JSCWeakValue* jSCWeakValue;

the main Gtk struct

Meta