Example #1
0
 internal static extern JsErrorCode JsSetRuntimeBeforeCollectCallback(JsRuntime runtime, IntPtr callbackState,
                                                                      JsBeforeCollectCallback beforeCollectCallback);
 /// <summary>
 /// Sets a callback function that is called by the runtime before garbage collection
 /// </summary>
 /// <remarks>
 /// <para>
 /// The callback is invoked on the current runtime execution thread, therefore execution is
 /// blocked until the callback completes.
 /// </para>
 /// <para>
 /// The callback can be used by hosts to prepare for garbage collection. For example, by
 /// releasing unnecessary references on Chakra objects.
 /// </para>
 /// </remarks>
 /// <param name="callbackState">User provided state that will be passed back to the callback</param>
 /// <param name="beforeCollectCallback">The callback function being set</param>
 public void SetBeforeCollectCallback(IntPtr callbackState, JsBeforeCollectCallback beforeCollectCallback)
 {
     JsErrorHelpers.ThrowIfError(NativeMethods.JsSetRuntimeBeforeCollectCallback(this, callbackState, beforeCollectCallback));
 }
		internal static extern JsErrorCode JsSetRuntimeBeforeCollectCallback(EdgeJsRuntime runtime, IntPtr callbackState, JsBeforeCollectCallback beforeCollectCallback);
 /// <summary>
 /// Sets a callback function that is called by the runtime before garbage collection
 /// </summary>
 /// <remarks>
 /// <para>
 /// The callback is invoked on the current runtime execution thread, therefore execution is
 /// blocked until the callback completes.
 /// </para>
 /// <para>
 /// The callback can be used by hosts to prepare for garbage collection. For example, by
 /// releasing unnecessary references on Chakra objects.
 /// </para>
 /// </remarks>
 /// <param name="callbackState">User provided state that will be passed back to the callback</param>
 /// <param name="beforeCollectCallback">The callback function being set</param>
 public void SetBeforeCollectCallback(IntPtr callbackState, JsBeforeCollectCallback beforeCollectCallback)
 {
     IeJsErrorHelpers.ThrowIfError(IeNativeMethods.JsSetRuntimeBeforeCollectCallback(this, callbackState, beforeCollectCallback));
 }
Example #5
0
 /// <summary>
 ///     Sets a callback function that is called by the runtime before garbage collection.
 /// </summary>
 /// <remarks>
 ///     <para>
 ///     The callback is invoked on the current runtime execution thread, therefore execution is
 ///     blocked until the callback completes.
 ///     </para>
 ///     <para>
 ///     The callback can be used by hosts to prepare for garbage collection. For example, by
 ///     releasing unnecessary references on Chakra objects.
 ///     </para>
 /// </remarks>
 /// <param name="callbackState">
 ///     User provided state that will be passed back to the callback.
 /// </param>
 /// <param name="beforeCollectCallback">The callback function being set.</param>
 public void SetBeforeCollectCallback(IntPtr callbackState, JsBeforeCollectCallback beforeCollectCallback)
 {
     Native.ThrowIfError(Native.JsSetRuntimeBeforeCollectCallback(this, callbackState, beforeCollectCallback));
 }