ForceGC() 개인적인 메소드

private ForceGC ( NativeV8EngineProxy engine ) : void
engine NativeV8EngineProxy
리턴 void
예제 #1
0
        // --------------------------------------------------------------------------------------------------------------------

        /// <summary>
        /// Calling this method forces an "idle" loop in the native proxy until the V8 engine finishes pending work tasks.
        /// The work performed helps to reduce the memory footprint within the native V8 engine.
        /// <para>(See also: <seealso cref="DoIdleNotification(int)"/>)</para>
        /// <para>Note: You CANNOT GC CLR objects using this method.  This only applies to collection of native V8 handles that are no longer in use.
        /// To *force* the disposal of an object, do this: "{Handle}.ReleaseManagedObject(); {Handle}.Dispose(); GC.Collect();"</para>
        /// </summary>
        public void ForceV8GarbageCollection()
        {
            V8NetProxy.ForceGC(_NativeV8EngineProxy);
        }