private DeleteObjectTemplateProxy ( |
||
objectTemplateProxy | ||
리턴 | void |
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; } }
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; }
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); }