Method | Description | |
---|---|---|
CollectGarbage ( ) : void |
Performs a full garbage collection
|
|
Create ( ) : |
Creates a new runtime
|
|
Create ( JsRuntimeAttributes attributes, JsRuntimeVersion version ) : |
Creates a new runtime
|
|
Create ( JsRuntimeAttributes attributes, JsRuntimeVersion version, JsThreadServiceCallback threadServiceCallback ) : |
Creates a new runtime
|
|
CreateContext ( ) : |
Creates a script context for running scripts Each script context has its own global object that is isolated from all other script contexts. |
|
CreateContext ( IDebugApplication32 debugApplication ) : |
Creates a debug script context for running scripts Each script context has its own global object that is isolated from all other script contexts. |
|
CreateContext ( IDebugApplication64 debugApplication ) : |
Creates a debug script context for running scripts Each script context has its own global object that is isolated from all other script contexts. |
|
Dispose ( ) : void |
Disposes a runtime Once a runtime has been disposed, all resources owned by it are invalid and cannot be used. If the runtime is active (i.e. it is set to be current on a particular thread), it cannot be disposed. |
|
SetBeforeCollectCallback ( |
Sets a callback function that is called by the runtime before garbage collection The callback is invoked on the current runtime execution thread, therefore execution is blocked until the callback completes. The callback can be used by hosts to prepare for garbage collection. For example, by releasing unnecessary references on Chakra objects. |
|
SetMemoryAllocationCallback ( |
Sets a memory allocation callback for specified runtime Registering a memory allocation callback will cause the runtime to call back to the host whenever it acquires memory from, or releases memory to, the OS. The callback routine is called before the runtime memory manager allocates a block of memory. The allocation will be rejected if the callback returns false. The runtime memory manager will also invoke the callback routine after freeing a block of memory, as well as after allocation failures. The callback is invoked on the current runtime execution thread, therefore execution is blocked until the callback completes. The return value of the callback is not stored; previously rejected allocations will not prevent the runtime from invoking the callback again later for new memory allocations. |
public static Create ( JsRuntimeAttributes attributes, JsRuntimeVersion version ) : |
||
attributes | JsRuntimeAttributes | The attributes of the runtime to be created |
version | JsRuntimeVersion | The version of the runtime to be created |
return |
public static Create ( JsRuntimeAttributes attributes, JsRuntimeVersion version, JsThreadServiceCallback threadServiceCallback ) : |
||
attributes | JsRuntimeAttributes | The attributes of the runtime to be created |
version | JsRuntimeVersion | The version of the runtime to be created |
threadServiceCallback | JsThreadServiceCallback | The thread service for the runtime. Can be null. |
return |
public CreateContext ( IDebugApplication32 debugApplication ) : |
||
debugApplication | IDebugApplication32 | The debug application to use |
return |
public CreateContext ( IDebugApplication64 debugApplication ) : |
||
debugApplication | IDebugApplication64 | The debug application to use |
return |
public SetBeforeCollectCallback ( |
||
callbackState | User provided state that will be passed back to the callback | |
beforeCollectCallback | JsBeforeCollectCallback | The callback function being set |
return | void |
public SetMemoryAllocationCallback ( |
||
callbackState | /// User provided state that will be passed back to the callback /// | |
allocationCallback | JsMemoryAllocationCallback | /// Memory allocation callback to be called for memory allocation events /// |
return | void |