From 16e6232a34c23859eed5c4d58a5cdb76934029f4 Mon Sep 17 00:00:00 2001 From: "guowei.wang" Date: Tue, 15 Dec 2020 15:45:06 +0800 Subject: [PATCH] [NUI] Fix CA2000 issues of UIComponents. --- src/Tizen.NUI/src/public/UIComponents/Button.cs | 56 ++++++++++++----- src/Tizen.NUI/src/public/UIComponents/Popup.cs | 70 +++++++++++++++------- .../src/public/UIComponents/ProgressBar.cs | 14 +++-- src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs | 28 ++++++--- .../src/public/UIComponents/ScrollView.cs | 4 +- .../src/public/UIComponents/ScrollViewEvent.cs | 8 ++- src/Tizen.NUI/src/public/UIComponents/Slider.cs | 42 +++++++++---- 7 files changed, 159 insertions(+), 63 deletions(-) diff --git a/src/Tizen.NUI/src/public/UIComponents/Button.cs b/src/Tizen.NUI/src/public/UIComponents/Button.cs index 4cc7e01..d470ca9 100755 --- a/src/Tizen.NUI/src/public/UIComponents/Button.cs +++ b/src/Tizen.NUI/src/public/UIComponents/Button.cs @@ -485,7 +485,9 @@ namespace Tizen.NUI.UIComponents if (_clickedEventHandler == null) { _clickedCallback = OnClicked; - ClickedSignal().Connect(_clickedCallback); + ButtonSignal clickSignal = ClickedSignal(); + clickSignal?.Connect(_clickedCallback); + clickSignal?.Dispose(); } _clickedEventHandler += value; @@ -495,10 +497,12 @@ namespace Tizen.NUI.UIComponents { _clickedEventHandler -= value; - if (_clickedEventHandler == null && ClickedSignal().Empty() == false) + ButtonSignal clickSignal = ClickedSignal(); + if (_clickedEventHandler == null && clickSignal.Empty() == false) { - ClickedSignal().Disconnect(_clickedCallback); + clickSignal?.Disconnect(_clickedCallback); } + clickSignal?.Dispose(); } } @@ -516,7 +520,9 @@ namespace Tizen.NUI.UIComponents if (_pressedEventHandler == null) { _pressedCallback = OnPressed; - PressedSignal().Connect(_pressedCallback); + ButtonSignal pressSignal = PressedSignal(); + pressSignal?.Connect(_pressedCallback); + pressSignal?.Dispose(); } _pressedEventHandler += value; @@ -526,10 +532,12 @@ namespace Tizen.NUI.UIComponents { _pressedEventHandler -= value; - if (_pressedEventHandler == null && PressedSignal().Empty() == false) + ButtonSignal pressSignal = this.PressedSignal(); + if (_pressedEventHandler == null && pressSignal.Empty() == false) { - this.PressedSignal().Disconnect(_pressedCallback); + pressSignal?.Disconnect(_pressedCallback); } + pressSignal?.Dispose(); } } @@ -547,7 +555,9 @@ namespace Tizen.NUI.UIComponents if (_releasedEventHandler == null) { _releasedCallback = OnReleased; - ReleasedSignal().Connect(_releasedCallback); + ButtonSignal releaseSignal = ReleasedSignal(); + releaseSignal?.Connect(_releasedCallback); + releaseSignal?.Dispose(); } _releasedEventHandler += value; } @@ -556,10 +566,12 @@ namespace Tizen.NUI.UIComponents { _releasedEventHandler -= value; - if (_releasedEventHandler == null && ReleasedSignal().Empty() == false) + ButtonSignal releaseSignal = ReleasedSignal(); + if (_releasedEventHandler == null && releaseSignal.Empty() == false) { - ReleasedSignal().Disconnect(_releasedCallback); + releaseSignal?.Disconnect(_releasedCallback); } + releaseSignal?.Dispose(); } } @@ -578,7 +590,9 @@ namespace Tizen.NUI.UIComponents if (_stateChangedEventHandler == null) { _stateChangedCallback = OnStateChanged; - StateChangedSignal().Connect(_stateChangedCallback); + ButtonSignal stateChanged = StateChangedSignal(); + stateChanged?.Connect(_stateChangedCallback); + stateChanged?.Dispose(); } _stateChangedEventHandler += value; @@ -588,10 +602,12 @@ namespace Tizen.NUI.UIComponents { _stateChangedEventHandler -= value; - if (_stateChangedEventHandler == null && StateChangedSignal().Empty() == false) + ButtonSignal stateChanged = StateChangedSignal(); + if (_stateChangedEventHandler == null && stateChanged.Empty() == false) { - StateChangedSignal().Disconnect(_stateChangedCallback); + stateChanged?.Disconnect(_stateChangedCallback); } + stateChanged?.Dispose(); } } @@ -1077,22 +1093,30 @@ namespace Tizen.NUI.UIComponents if (_stateChangedCallback != null) { - StateChangedSignal().Disconnect(_stateChangedCallback); + ButtonSignal stateChanged = StateChangedSignal(); + stateChanged?.Disconnect(_stateChangedCallback); + stateChanged?.Dispose(); } if (_releasedCallback != null) { - ReleasedSignal().Disconnect(_releasedCallback); + ButtonSignal released = ReleasedSignal(); + released?.Disconnect(_releasedCallback); + released?.Dispose(); } if (_pressedCallback != null) { - this.PressedSignal().Disconnect(_pressedCallback); + ButtonSignal pressSignal = PressedSignal(); + pressSignal?.Disconnect(_pressedCallback); + pressSignal?.Dispose(); } if (_clickedCallback != null) { - ClickedSignal().Disconnect(_clickedCallback); + ButtonSignal clickSignal = ClickedSignal(); + clickSignal?.Disconnect(_clickedCallback); + clickSignal?.Dispose(); } // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here. diff --git a/src/Tizen.NUI/src/public/UIComponents/Popup.cs b/src/Tizen.NUI/src/public/UIComponents/Popup.cs index 0ef8ffa..271fd1a 100755 --- a/src/Tizen.NUI/src/public/UIComponents/Popup.cs +++ b/src/Tizen.NUI/src/public/UIComponents/Popup.cs @@ -83,17 +83,21 @@ namespace Tizen.NUI.UIComponents if (_popUpOutsideTouchedEventHandler == null) { _popUpOutsideTouchedEventCallbackDelegate = (OnOutsideTouched); - OutsideTouchedSignal().Connect(_popUpOutsideTouchedEventCallbackDelegate); + VoidSignal outsideTouchedSignal = OutsideTouchedSignal(); + outsideTouchedSignal?.Connect(_popUpOutsideTouchedEventCallbackDelegate); + outsideTouchedSignal?.Dispose(); } _popUpOutsideTouchedEventHandler += value; } remove { _popUpOutsideTouchedEventHandler -= value; - if (_popUpOutsideTouchedEventHandler == null && OutsideTouchedSignal().Empty() == false) + VoidSignal outsideTouchedSignal = OutsideTouchedSignal(); + if (_popUpOutsideTouchedEventHandler == null && outsideTouchedSignal.Empty() == false) { - this.OutsideTouchedSignal().Disconnect(_popUpOutsideTouchedEventCallbackDelegate); + outsideTouchedSignal?.Disconnect(_popUpOutsideTouchedEventCallbackDelegate); } + outsideTouchedSignal?.Dispose(); } } @@ -111,17 +115,21 @@ namespace Tizen.NUI.UIComponents if (_popUpShowingEventHandler == null) { _popUpShowingEventCallbackDelegate = (OnShowing); - ShowingSignal().Connect(_popUpShowingEventCallbackDelegate); + VoidSignal showingSignal = ShowingSignal(); + showingSignal?.Connect(_popUpShowingEventCallbackDelegate); + showingSignal?.Dispose(); } _popUpShowingEventHandler += value; } remove { _popUpShowingEventHandler -= value; - if (_popUpShowingEventHandler == null && ShowingSignal().Empty() == false) + VoidSignal showingSignal = ShowingSignal(); + if (_popUpShowingEventHandler == null && showingSignal.Empty() == false) { - ShowingSignal().Disconnect(_popUpShowingEventCallbackDelegate); + showingSignal?.Disconnect(_popUpShowingEventCallbackDelegate); } + showingSignal?.Dispose(); } } @@ -139,17 +147,21 @@ namespace Tizen.NUI.UIComponents if (_popUpShownEventHandler == null) { _popUpShownEventCallbackDelegate = (OnShown); - ShownSignal().Connect(_popUpShownEventCallbackDelegate); + VoidSignal shownSignal = ShownSignal(); + shownSignal?.Connect(_popUpShownEventCallbackDelegate); + shownSignal?.Dispose(); } _popUpShownEventHandler += value; } remove { _popUpShownEventHandler -= value; - if (_popUpShownEventHandler == null && ShownSignal().Empty() == false) + VoidSignal shownSignal = ShownSignal(); + if (_popUpShownEventHandler == null && shownSignal.Empty() == false) { - ShownSignal().Disconnect(_popUpShownEventCallbackDelegate); + shownSignal?.Disconnect(_popUpShownEventCallbackDelegate); } + shownSignal?.Dispose(); } } @@ -167,17 +179,21 @@ namespace Tizen.NUI.UIComponents if (_popUpHidingEventHandler == null) { _popUpHidingEventCallbackDelegate = (OnHiding); - HidingSignal().Connect(_popUpHidingEventCallbackDelegate); + VoidSignal hidingSignal = HidingSignal(); + hidingSignal?.Connect(_popUpHidingEventCallbackDelegate); + hidingSignal?.Dispose(); } _popUpHidingEventHandler += value; } remove { _popUpHidingEventHandler -= value; - if (_popUpHidingEventHandler == null && HidingSignal().Empty() == false) + VoidSignal hidingSignal = HidingSignal(); + if (_popUpHidingEventHandler == null && hidingSignal.Empty() == false) { - HidingSignal().Disconnect(_popUpHidingEventCallbackDelegate); + hidingSignal?.Disconnect(_popUpHidingEventCallbackDelegate); } + hidingSignal?.Dispose(); } } @@ -195,17 +211,21 @@ namespace Tizen.NUI.UIComponents if (_popUpHiddenEventHandler == null) { _popUpHiddenEventCallbackDelegate = (OnHidden); - HiddenSignal().Connect(_popUpHiddenEventCallbackDelegate); + VoidSignal hiddenSignal = HiddenSignal(); + hiddenSignal?.Connect(_popUpHiddenEventCallbackDelegate); + hiddenSignal?.Dispose(); } _popUpHiddenEventHandler += value; } remove { _popUpHiddenEventHandler -= value; - if (_popUpHiddenEventHandler == null && HiddenSignal().Empty() == false) + VoidSignal hiddenSignal = HiddenSignal(); + if (_popUpHiddenEventHandler == null && hiddenSignal.Empty() == false) { - HiddenSignal().Disconnect(_popUpHiddenEventCallbackDelegate); + hiddenSignal?.Disconnect(_popUpHiddenEventCallbackDelegate); } + hiddenSignal?.Dispose(); } } @@ -908,28 +928,38 @@ namespace Tizen.NUI.UIComponents { if (_popUpHiddenEventCallbackDelegate != null) { - HiddenSignal().Disconnect(_popUpHiddenEventCallbackDelegate); + VoidSignal hiddenSignal = HiddenSignal(); + hiddenSignal?.Disconnect(_popUpHiddenEventCallbackDelegate); + hiddenSignal?.Dispose(); } if (_popUpHidingEventCallbackDelegate != null) { - HidingSignal().Disconnect(_popUpHidingEventCallbackDelegate); + VoidSignal hidingSignal = HidingSignal(); + hidingSignal?.Disconnect(_popUpHidingEventCallbackDelegate); + hidingSignal?.Dispose(); } } if (_popUpShownEventCallbackDelegate != null) { - ShownSignal().Disconnect(_popUpShownEventCallbackDelegate); + VoidSignal shownSignal = ShownSignal(); + shownSignal?.Disconnect(_popUpShownEventCallbackDelegate); + shownSignal?.Dispose(); } if (_popUpShowingEventCallbackDelegate != null) { - ShowingSignal().Disconnect(_popUpShowingEventCallbackDelegate); + VoidSignal showingSignal = ShowingSignal(); + showingSignal?.Disconnect(_popUpShowingEventCallbackDelegate); + showingSignal?.Dispose(); } if (_popUpOutsideTouchedEventCallbackDelegate != null) { - this.OutsideTouchedSignal().Disconnect(_popUpOutsideTouchedEventCallbackDelegate); + VoidSignal outsideTouchedSingal = this.OutsideTouchedSignal(); + outsideTouchedSingal?.Disconnect(_popUpOutsideTouchedEventCallbackDelegate); + outsideTouchedSingal?.Dispose(); } base.Dispose(type); diff --git a/src/Tizen.NUI/src/public/UIComponents/ProgressBar.cs b/src/Tizen.NUI/src/public/UIComponents/ProgressBar.cs index bfe6cc2..da28190 100755 --- a/src/Tizen.NUI/src/public/UIComponents/ProgressBar.cs +++ b/src/Tizen.NUI/src/public/UIComponents/ProgressBar.cs @@ -231,17 +231,21 @@ namespace Tizen.NUI.UIComponents if (_progressBarValueChangedEventHandler == null) { _progressBarValueChangedCallbackDelegate = (OnValueChanged); - ValueChangedSignal().Connect(_progressBarValueChangedCallbackDelegate); + ProgressBarValueChangedSignal valueChanged = ValueChangedSignal(); + valueChanged?.Connect(_progressBarValueChangedCallbackDelegate); + valueChanged?.Dispose(); } _progressBarValueChangedEventHandler += value; } remove { _progressBarValueChangedEventHandler -= value; - if (_progressBarValueChangedEventHandler == null && ValueChangedSignal().Empty() == false) + ProgressBarValueChangedSignal valueChanged = ValueChangedSignal(); + if (_progressBarValueChangedEventHandler == null && valueChanged.Empty() == false) { - ValueChangedSignal().Disconnect(_progressBarValueChangedCallbackDelegate); + valueChanged?.Disconnect(_progressBarValueChangedCallbackDelegate); } + valueChanged?.Dispose(); } } @@ -460,7 +464,9 @@ namespace Tizen.NUI.UIComponents if (this != null && _progressBarValueChangedCallbackDelegate != null) { - ValueChangedSignal().Disconnect(_progressBarValueChangedCallbackDelegate); + ProgressBarValueChangedSignal valueChanged = ValueChangedSignal(); + valueChanged?.Disconnect(_progressBarValueChangedCallbackDelegate); + valueChanged?.Dispose(); } base.Dispose(type); diff --git a/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs b/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs index c0a85aa..c85d0f1 100755 --- a/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs +++ b/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs @@ -289,17 +289,21 @@ namespace Tizen.NUI.UIComponents if (_scrollBarPanFinishedEventHandler == null) { _scrollBarPanFinishedEventCallbackDelegate = (OnScrollBarPanFinished); - PanFinishedSignal().Connect(_scrollBarPanFinishedEventCallbackDelegate); + VoidSignal panFinished = PanFinishedSignal(); + panFinished?.Connect(_scrollBarPanFinishedEventCallbackDelegate); + panFinished?.Dispose(); } _scrollBarPanFinishedEventHandler += value; } remove { _scrollBarPanFinishedEventHandler -= value; - if (_scrollBarPanFinishedEventHandler == null && PanFinishedSignal().Empty() == false) + VoidSignal panFinished = PanFinishedSignal(); + if (_scrollBarPanFinishedEventHandler == null && panFinished.Empty() == false) { - PanFinishedSignal().Disconnect(_scrollBarPanFinishedEventCallbackDelegate); + panFinished?.Disconnect(_scrollBarPanFinishedEventCallbackDelegate); } + panFinished?.Dispose(); } } @@ -318,17 +322,21 @@ namespace Tizen.NUI.UIComponents if (_scrollBarScrollPositionIntervalReachedEventHandler == null) { _scrollBarScrollPositionIntervalReachedEventCallbackDelegate = (OnScrollBarScrollPositionIntervalReached); - ScrollPositionIntervalReachedSignal().Connect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate); + FloatSignal scrollPositionIntervalReached = ScrollPositionIntervalReachedSignal(); + scrollPositionIntervalReached?.Connect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate); + scrollPositionIntervalReached?.Dispose(); } _scrollBarScrollPositionIntervalReachedEventHandler += value; } remove { _scrollBarScrollPositionIntervalReachedEventHandler -= value; - if (_scrollBarScrollPositionIntervalReachedEventHandler == null && ScrollPositionIntervalReachedSignal().Empty() == false) + FloatSignal scrollPositionIntervalReached = ScrollPositionIntervalReachedSignal(); + if (_scrollBarScrollPositionIntervalReachedEventHandler == null && scrollPositionIntervalReached.Empty() == false) { - ScrollPositionIntervalReachedSignal().Disconnect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate); + scrollPositionIntervalReached?.Disconnect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate); } + scrollPositionIntervalReached?.Dispose(); } } @@ -705,12 +713,16 @@ namespace Tizen.NUI.UIComponents { if (_scrollBarScrollPositionIntervalReachedEventCallbackDelegate != null) { - ScrollPositionIntervalReachedSignal().Disconnect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate); + FloatSignal scrollPositionIntervalReached = ScrollPositionIntervalReachedSignal(); + scrollPositionIntervalReached?.Disconnect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate); + scrollPositionIntervalReached?.Dispose(); } if (_scrollBarPanFinishedEventCallbackDelegate != null) { - PanFinishedSignal().Disconnect(_scrollBarPanFinishedEventCallbackDelegate); + VoidSignal panFinished = PanFinishedSignal(); + panFinished?.Disconnect(_scrollBarPanFinishedEventCallbackDelegate); + panFinished?.Dispose(); } } diff --git a/src/Tizen.NUI/src/public/UIComponents/ScrollView.cs b/src/Tizen.NUI/src/public/UIComponents/ScrollView.cs index 52764fe..50c2da4 100755 --- a/src/Tizen.NUI/src/public/UIComponents/ScrollView.cs +++ b/src/Tizen.NUI/src/public/UIComponents/ScrollView.cs @@ -1229,7 +1229,9 @@ namespace Tizen.NUI if (this != null && _scrollViewSnapStartedCallbackDelegate != null) { - this.SnapStartedSignal().Disconnect(_scrollViewSnapStartedCallbackDelegate); + ScrollViewSnapStartedSignal snapStarted = this.SnapStartedSignal(); + snapStarted?.Disconnect(_scrollViewSnapStartedCallbackDelegate); + snapStarted?.Dispose(); } base.Dispose(type); diff --git a/src/Tizen.NUI/src/public/UIComponents/ScrollViewEvent.cs b/src/Tizen.NUI/src/public/UIComponents/ScrollViewEvent.cs index 8678191..3d7c2a3 100755 --- a/src/Tizen.NUI/src/public/UIComponents/ScrollViewEvent.cs +++ b/src/Tizen.NUI/src/public/UIComponents/ScrollViewEvent.cs @@ -54,7 +54,9 @@ namespace Tizen.NUI _scrollViewSnapStartedEventHandler += value; _scrollViewSnapStartedCallbackDelegate = new SnapStartedCallbackDelegate(OnSnapStarted); - this.SnapStartedSignal().Connect(_scrollViewSnapStartedCallbackDelegate); + ScrollViewSnapStartedSignal snapStarted = this.SnapStartedSignal(); + snapStarted?.Connect(_scrollViewSnapStartedCallbackDelegate); + snapStarted?.Dispose(); } } } @@ -65,7 +67,9 @@ namespace Tizen.NUI { if (_scrollViewSnapStartedEventHandler != null) { - this.SnapStartedSignal().Disconnect(_scrollViewSnapStartedCallbackDelegate); + ScrollViewSnapStartedSignal snapStarted = this.SnapStartedSignal(); + snapStarted?.Disconnect(_scrollViewSnapStartedCallbackDelegate); + snapStarted?.Dispose(); } _scrollViewSnapStartedEventHandler -= value; diff --git a/src/Tizen.NUI/src/public/UIComponents/Slider.cs b/src/Tizen.NUI/src/public/UIComponents/Slider.cs index f0c6524..5b731b9 100755 --- a/src/Tizen.NUI/src/public/UIComponents/Slider.cs +++ b/src/Tizen.NUI/src/public/UIComponents/Slider.cs @@ -352,17 +352,21 @@ namespace Tizen.NUI.UIComponents if (_sliderValueChangedEventHandler == null) { _sliderValueChangedCallbackDelegate = (OnValueChanged); - ValueChangedSignal().Connect(_sliderValueChangedCallbackDelegate); + SliderValueChangedSignal valueChanged = ValueChangedSignal(); + valueChanged?.Connect(_sliderValueChangedCallbackDelegate); + valueChanged?.Dispose(); } _sliderValueChangedEventHandler += value; } remove { _sliderValueChangedEventHandler -= value; - if (_sliderValueChangedEventHandler == null && ValueChangedSignal().Empty() == false) + SliderValueChangedSignal valueChanged = ValueChangedSignal(); + if (_sliderValueChangedEventHandler == null && valueChanged.Empty() == false) { - ValueChangedSignal().Disconnect(_sliderValueChangedCallbackDelegate); + valueChanged?.Disconnect(_sliderValueChangedCallbackDelegate); } + valueChanged?.Dispose(); } } @@ -380,17 +384,21 @@ namespace Tizen.NUI.UIComponents if (_sliderSlidingFinishedEventHandler == null) { _sliderSlidingFinishedCallbackDelegate = (OnSlidingFinished); - SlidingFinishedSignal().Connect(_sliderSlidingFinishedCallbackDelegate); + SliderValueChangedSignal slidingFinished = SlidingFinishedSignal(); + slidingFinished?.Connect(_sliderSlidingFinishedCallbackDelegate); + slidingFinished?.Dispose(); } _sliderSlidingFinishedEventHandler += value; } remove { _sliderSlidingFinishedEventHandler -= value; - if (_sliderSlidingFinishedEventHandler == null && SlidingFinishedSignal().Empty() == false) + SliderValueChangedSignal slidingFinished = SlidingFinishedSignal(); + if (_sliderSlidingFinishedEventHandler == null && slidingFinished.Empty() == false) { - SlidingFinishedSignal().Disconnect(_sliderSlidingFinishedCallbackDelegate); + slidingFinished?.Disconnect(_sliderSlidingFinishedCallbackDelegate); } + slidingFinished?.Dispose(); } } @@ -408,17 +416,21 @@ namespace Tizen.NUI.UIComponents if (_sliderMarkReachedEventHandler == null) { _sliderMarkReachedCallbackDelegate = (OnMarkReached); - MarkReachedSignal().Connect(_sliderMarkReachedCallbackDelegate); + SliderMarkReachedSignal markReached = MarkReachedSignal(); + markReached?.Connect(_sliderMarkReachedCallbackDelegate); + markReached?.Dispose(); } _sliderMarkReachedEventHandler += value; } remove { _sliderMarkReachedEventHandler -= value; - if (_sliderMarkReachedEventHandler == null && MarkReachedSignal().Empty() == false) + SliderMarkReachedSignal markReached = MarkReachedSignal(); + if (_sliderMarkReachedEventHandler == null && markReached.Empty() == false) { - MarkReachedSignal().Disconnect(_sliderMarkReachedCallbackDelegate); + markReached?.Disconnect(_sliderMarkReachedCallbackDelegate); } + markReached?.Dispose(); } } @@ -824,17 +836,23 @@ namespace Tizen.NUI.UIComponents { if (_sliderValueChangedCallbackDelegate != null) { - ValueChangedSignal().Disconnect(_sliderValueChangedCallbackDelegate); + SliderValueChangedSignal valueChanged = ValueChangedSignal(); + valueChanged?.Disconnect(_sliderValueChangedCallbackDelegate); + valueChanged?.Dispose(); } if (_sliderSlidingFinishedCallbackDelegate != null) { - SlidingFinishedSignal().Disconnect(_sliderSlidingFinishedCallbackDelegate); + SliderValueChangedSignal slidingFinished = SlidingFinishedSignal(); + slidingFinished?.Disconnect(_sliderSlidingFinishedCallbackDelegate); + slidingFinished?.Dispose(); } if (_sliderMarkReachedCallbackDelegate != null) { - MarkReachedSignal().Disconnect(_sliderMarkReachedCallbackDelegate); + SliderMarkReachedSignal markReached = MarkReachedSignal(); + markReached?.Disconnect(_sliderMarkReachedCallbackDelegate); + markReached?.Dispose(); } } -- 2.7.4