return ret;
}
- /// This will not be public opened.
+ /// <summary>
+ /// override it to clean-up your own resources.
+ /// </summary>
+ /// <param name="type"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
- protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ protected override void Dispose(DisposeTypes type)
{
- if (detectedCallback != null)
+ if (disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ //Called by User
+ //Release your own managed resources here.
+ //You should release all of your own disposable objects here.
+ }
+
+ //Release your own unmanaged resources here.
+ //You should not access any managed member here except static instance.
+ //because the execution order of Finalizes is non-deterministic.
+
+ if (HasBody())
{
- DetectedSignal().Disconnect(detectedCallback);
+ if (detectedCallback != null)
+ {
+ using PinchGestureDetectedSignal signal = new PinchGestureDetectedSignal(Interop.PinchGesture.PinchGestureDetectorDetectedSignal(GetBaseHandleCPtrHandleRef), false);
+ signal?.Disconnect(detectedCallback);
+ detectedCallback = null;
+ }
}
+ base.Dispose(type);
+ }
+ /// This will not be public opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
Interop.PinchGesture.DeletePinchGestureDetector(swigCPtr);
}
return ret;
}
- /// This will not be public opened.
+ /// <summary>
+ /// override it to clean-up your own resources.
+ /// </summary>
+ /// <param name="type"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
- protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ protected override void Dispose(DisposeTypes type)
{
- if (detectedCallback != null)
+ if (disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ //Called by User
+ //Release your own managed resources here.
+ //You should release all of your own disposable objects here.
+ }
+
+ //Release your own unmanaged resources here.
+ //You should not access any managed member here except static instance.
+ //because the execution order of Finalizes is non-deterministic.
+
+ if (HasBody())
{
- DetectedSignal().Disconnect(detectedCallback);
+ if (detectedCallback != null)
+ {
+ using RotationGestureDetectedSignal signal = new RotationGestureDetectedSignal(Interop.RotationGesture.RotationGestureDetectorDetectedSignal(GetBaseHandleCPtrHandleRef), false);
+ signal?.Disconnect(detectedCallback);
+ detectedCallback = null;
+ }
}
+ base.Dispose(type);
+ }
+ /// This will not be public opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
Interop.RotationGesture.DeleteRotationGestureDetector(swigCPtr);
}
return ret;
}
- /// This will not be public opened.
+ /// <summary>
+ /// override it to clean-up your own resources.
+ /// </summary>
+ /// <param name="type"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
- protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ protected override void Dispose(DisposeTypes type)
{
- if (_detectedCallback != null)
+ if (disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
{
- DetectedSignal().Disconnect(_detectedCallback);
+ //Called by User
+ //Release your own managed resources here.
+ //You should release all of your own disposable objects here.
}
+ //Release your own unmanaged resources here.
+ //You should not access any managed member here except static instance.
+ //because the execution order of Finalizes is non-deterministic.
+
+ if (HasBody())
+ {
+ if (_detectedCallback != null)
+ {
+ using TapGestureDetectedSignal signal = new TapGestureDetectedSignal(Interop.TapGestureDetector.DetectedSignal(GetBaseHandleCPtrHandleRef), false);
+ signal?.Disconnect(_detectedCallback);
+ _detectedCallback = null;
+ }
+ }
+ base.Dispose(type);
+ }
+
+ /// This will not be public opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
Interop.TapGestureDetector.DeleteTapGestureDetector(swigCPtr);
}