DeleteFunctionTemplateProxy() приватный Метод

private DeleteFunctionTemplateProxy ( NativeFunctionTemplateProxy functionTemplateProxy ) : void
functionTemplateProxy NativeFunctionTemplateProxy
Результат void
        public override void Dispose()
        {
            if (_NativeFunctionTemplateProxy != null && CanDispose)
            {
                V8NetProxy.DeleteFunctionTemplateProxy(_NativeFunctionTemplateProxy); // (delete the corresponding native object as well; WARNING: This is done on the GC thread!)
                _NativeFunctionTemplateProxy = null;

                PrototypeTemplate.Parent = null;
                InstanceTemplate.Parent  = null;
                PrototypeTemplate        = null;
                InstanceTemplate         = null;
            }
        }
Пример #2
0
        public void Dispose()
        {
            if (_NativeFunctionTemplateProxy != null)
            {
                V8NetProxy.DeleteFunctionTemplateProxy(_NativeFunctionTemplateProxy); // (delete the corresponding native object as well; WARNING: This is done on the GC thread!)
                _NativeFunctionTemplateProxy = null;

                PrototypeTemplate.Parent = null;
                InstanceTemplate.Parent  = null;
                PrototypeTemplate        = null;
                InstanceTemplate         = null;
            }

            ((IFinalizable)this).CanFinalize = true;
        }
Пример #3
0
        protected override bool _Finalize(bool finalizer) // (note: This can cause issues if removed while the native object exists [because of the callbacks].)
        {
            if (_NativeFunctionTemplateProxy != null)
            {
                if (V8NetProxy.DeleteFunctionTemplateProxy(_NativeFunctionTemplateProxy)) // (delete the corresponding native object as well; WARNING: This is done on the GC thread!)
                {
                    _NativeFunctionTemplateProxy = null;

                    PrototypeTemplate.Parent = null;
                    InstanceTemplate.Parent  = null;
                    PrototypeTemplate        = null;
                    InstanceTemplate         = null;
                }
                else
                {
                    return(false); // (bounced, a script might be in progress; try again later)
                }
            }
            return(true);
        }