DeleteObjectTemplateProxy() 개인적인 메소드

private DeleteObjectTemplateProxy ( NativeObjectTemplateProxy objectTemplateProxy ) : void
objectTemplateProxy NativeObjectTemplateProxy
리턴 void
예제 #1
0
        public override void Dispose() // (note: This can cause issues if removed while the native object exists [because of the callbacks].)
        {
            if (_NativeObjectTemplateProxy != null && CanDispose)
            {
                _Engine._ClearAccessors(_NativeObjectTemplateProxy->ObjectID);

                V8NetProxy.DeleteObjectTemplateProxy(_NativeObjectTemplateProxy); // (delete the corresponding native object as well; WARNING: This is done on the GC thread!)

                _NativeObjectTemplateProxy = null;
            }
        }
예제 #2
0
        public void Dispose() // TODO: !!! This will cause issues if removed while the native object exists. !!!
        {
            if (_NativeObjectTemplateProxy != null)
            {
                _Engine._ClearAccessors(_NativeObjectTemplateProxy->ObjectID);

                V8NetProxy.DeleteObjectTemplateProxy(_NativeObjectTemplateProxy); // (delete the corresponding native object as well; WARNING: This is done on the GC thread!)
                _NativeObjectTemplateProxy = 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 (_NativeObjectTemplateProxy != null)
     {
         if (V8NetProxy.DeleteObjectTemplateProxy(_NativeObjectTemplateProxy)) // (delete the corresponding native object as well; WARNING: This may be done on the GC thread!)
         {
             _NativeObjectTemplateProxy = null;
         }
         else
         {
             return(false); // (bounced, a script might be in progress; try again later)
         }
     }
     return(true);
 }