/// <summary> /// Dispose. /// </summary> /// <since_tizen> 3 </since_tizen> protected virtual void Dispose(DisposeTypes type) { 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. //Unreference this instance from Registry. if (registerMe) { Registry.Unregister(this); } if (SwigCPtr.Handle != IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; ReleaseSwigCPtr(SwigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } if (swigCPtrCopy.Handle != global::System.IntPtr.Zero) { swigCMemOwn = false; Interop.BaseHandle.DeleteBaseHandle(swigCPtrCopy); swigCPtrCopy = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } disposed = true; }
protected override void Dispose(DisposeTypes type) { 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 (this != null) { if (_scrollBarScrollPositionIntervalReachedEventCallbackDelegate != null) { ScrollPositionIntervalReachedSignal().Disconnect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate); } if (_scrollBarPanFinishedEventCallbackDelegate != null) { PanFinishedSignal().Disconnect(_scrollBarPanFinishedEventCallbackDelegate); } } if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; Interop.ScrollBar.delete_ScrollBar(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } base.Dispose(type); }
protected override void Dispose(DisposeTypes type) { if (disposed) { return; } if (type == DisposeTypes.Explicit) { //Extension : Extension?.OnDispose(this); // Arugable to disposing user-created members. /* * if (itemIcon != null) * { * Utility.Dispose(itemIcon); * } * if (itemExtra != null) * { * Utility.Dispose(itemExtra); * } */ if (itemLabel != null) { Utility.Dispose(itemLabel); itemLabel = null; } if (itemSubLabel != null) { Utility.Dispose(itemSubLabel); itemSubLabel = null; } if (itemSeperator != null) { Utility.Dispose(itemSeperator); itemSeperator = null; } } base.Dispose(type); }
/// <summary> /// you can override it to clean-up your own resources. /// </summary> /// <param name="type">DisposeTypes</param> /// <since_tizen> 3 </since_tizen> protected override void Dispose(DisposeTypes type) { if (disposed) { return; } //_mergedStyle = null; if (type == DisposeTypes.Explicit) { //Called by User //Release your own managed resources here. //You should release all of your own disposable objects here. selectorData?.Reset(this); } //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 (this != null) { DisConnectFromSignals(); } if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; Interop.View.delete_View(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } foreach (View view in Children) { view.InternalParent = null; } base.Dispose(type); }
protected override void Dispose(DisposeTypes type) { if (disposed) { return; } //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 (this != null && _progressBarValueChangedCallbackDelegate != null) { ProgressBarValueChangedSignal valueChanged = ValueChangedSignal(); valueChanged?.Disconnect(_progressBarValueChangedCallbackDelegate); valueChanged?.Dispose(); } base.Dispose(type); }
/// <summary> /// Dispose. /// </summary> /// <since_tizen> 4 </since_tizen> protected override void Dispose(DisposeTypes type) { if (disposed) { return; } //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 (swigCPtr.Handle != global::System.IntPtr.Zero) { swigCMemOwn = false; Interop.Adaptor.delete_Adaptor(swigCPtr); swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } base.Dispose(type); }
protected override void Dispose(DisposeTypes type) { if (disposed) { return; } if (type == DisposeTypes.Explicit) { Clear(); if (tapGestureDetector != null) { tapGestureDetector.Detected -= OnTapGestureDetected; tapGestureDetector.Dispose(); tapGestureDetector = null; } } base.Dispose(type); }
protected override void Dispose(DisposeTypes type) { if (disposed) { return; } if (type == DisposeTypes.Explicit) { tapGestureDetector.Detected -= OnTapGestureDetected; tapGestureDetector.Detach(this); if (feedback != null) { feedback.Stop(); feedback = null; } } base.Dispose(type); }
/// <summary> /// Dispose. /// </summary> /// <since_tizen> 3 </since_tizen> protected override void Dispose(DisposeTypes type) { if (disposed) { return; } //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 (this != null) { if (_sliderValueChangedCallbackDelegate != null) { ValueChangedSignal().Disconnect(_sliderValueChangedCallbackDelegate); } if (_sliderSlidingFinishedCallbackDelegate != null) { SlidingFinishedSignal().Disconnect(_sliderSlidingFinishedCallbackDelegate); } if (_sliderMarkReachedCallbackDelegate != null) { MarkReachedSignal().Disconnect(_sliderMarkReachedCallbackDelegate); } } if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; Interop.Slider.delete_Slider(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } base.Dispose(type); }
/// <inheritdoc/> protected virtual void Dispose(DisposeTypes type) { int res; if (!disposed) { if (_tzsh != IntPtr.Zero) { res = Interop.TizenShell.Destroy(_tzsh); try { ErrorCodeThrow(res); } catch (ArgumentException e) { throw new MemberAccessException("TizehShell is a corrupted"); } _tzsh = IntPtr.Zero; } disposed = true; } }
protected override void Dispose(DisposeTypes type) { if (disposed) { return; } if (systemlangTextFlag) { SystemSettings.LocaleLanguageChanged -= SystemSettings_LocaleLanguageChanged; } if (type == DisposeTypes.Explicit) { //Called by User //Release your own managed resources here. //You should release all of your own disposable objects here. selectorData?.Reset(this); } base.Dispose(type); }
/// <inheritdoc/> protected virtual void Dispose(DisposeTypes disposing) { int res; if (!disposed) { if (_tzshQpService != IntPtr.Zero) { res = Interop.QuickPanelService.Destroy(_tzshQpService); try { _tzsh.ErrorCodeThrow(res); } catch (ArgumentException) { throw new MemberAccessException("QuickPanelService is a corrupted"); } _tzshQpService = IntPtr.Zero; } disposed = true; } }
/// <inheritdoc/> protected virtual void Dispose(DisposeTypes type) { int res; if (!disposed) { if (_region != IntPtr.Zero) { res = Interop.TizenRegion.Destroy(_region); try { _tzsh.ErrorCodeThrow(res); } catch (ArgumentException) { throw new MemberAccessException("TizenRegion is a corrupted"); } _region = IntPtr.Zero; } disposed = true; } }