Type Alias

JSObjectFinalizeCallback

The callback invoked when an object is finalized (prepared for garbage collection). An object may be finalized on any thread.

Declaration

typedef void (*JSObjectFinalizeCallback)(JSObjectRef object);

Parameters

object

The JSObject being finalized.

Discussion

If you named your function Finalize, you would declare it like this:

void Finalize(JSObjectRef object);

The finalize callback is called on the most derived class first, and the least derived class (the parent class) last.

You must not call any function that may cause a garbage collection or an allocation of a garbage collected object from within a JSObjectFinalizeCallback. This includes all functions that have a JSContextRef parameter.

See Also

Callbacks

JSObjectCallAsConstructorCallback

The callback invoked when an object is used as a constructor in a 'new' expression.

JSObjectCallAsFunctionCallback

The callback invoked when an object is called as a function.

JSObjectConvertToTypeCallback

The callback invoked when converting an object to a particular JavaScript type.

JSObjectDeletePropertyCallback

The callback invoked when deleting a property.

JSObjectGetPropertyCallback

The callback invoked when getting a property’s value.

JSObjectGetPropertyNamesCallback

The callback invoked when collecting the names of an object’s properties.

JSObjectHasInstanceCallback

hasInstance The callback invoked when an object is used as the target of an 'instanceof' expression.

JSObjectHasPropertyCallback

The callback invoked when determining whether an object has a property.

JSObjectInitializeCallback

The callback invoked when an object is first created.

JSObjectSetPropertyCallback

The callback invoked when setting a property’s value.