Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [55.2.3]
- [iOS][SearchBar] Fixed memory leak where `SearchButtonClicked` event was never unsubscribed due to wrong event name in cleanup
- [iOS][Camera] Fixed memory leak where `PreviewView.OnTapToFocus` event was never unsubscribed when stopping camera session
- [SlidableLayout] Fixed memory leak where `TapGestureRecognizer.Tapped` event was never unsubscribed due to missing field reference

## [55.2.2]
- [iOS26][Tip] Added more padding.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ await Task.Run(() =>
if (PreviewView is not null)
{
PreviewView.OnZoomChanged -= PreviewViewOnZoomChanged;
PreviewView.OnTapToFocus -= PreviewViewOnOnTapToFocus;
PreviewView?.Dispose();
PreviewView = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ private void OnSearchButtonClicked(object? sender, EventArgs e)
private void UnSubscribeToEvents(DuiSearchBar platformView)
{
platformView.CancelButtonClicked -= OnCancelButtonClicked;
platformView.CancelButtonClicked -= OnSearchButtonClicked;
platformView.SearchButtonClicked -= OnSearchButtonClicked;
platformView.TextChanged -= OnSearchTextChanged;

if (platformView.SearchTextField.ValueForKey(new NSString("_clearButton")) is UIButton clearButton)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace DIPS.Mobile.UI.Components.Slidable
public abstract partial class SlidableLayout : ContentView
{
private readonly PanGestureRecognizer m_panGestureRecognizer;
private readonly TapGestureRecognizer m_tapGestureRecognizer;
private readonly AccelerationService m_accelerator = new(true);
private int m_lastId = -2; // Different than default of SlideProperties
private double m_startSlideLocation;
Expand Down Expand Up @@ -37,9 +38,9 @@ public SlidableLayout()

m_panGestureRecognizer.PanUpdated += PanGestureRecognizerPanUpdated;

var tapGestureRecognizer = new TapGestureRecognizer();
GestureRecognizers.Add(tapGestureRecognizer);
tapGestureRecognizer.Tapped += OnEntireLayoutTapped;
m_tapGestureRecognizer = new TapGestureRecognizer();
GestureRecognizers.Add(m_tapGestureRecognizer);
m_tapGestureRecognizer.Tapped += OnEntireLayoutTapped;

m_currentOrientation = DeviceDisplay.MainDisplayInfo.Orientation;
}
Expand Down Expand Up @@ -296,6 +297,7 @@ protected override void OnHandlerChanging(HandlerChangingEventArgs args)
if (args.NewHandler is null)
{
m_panGestureRecognizer.PanUpdated -= PanGestureRecognizerPanUpdated;
m_tapGestureRecognizer.Tapped -= OnEntireLayoutTapped;
}
}
}
Expand Down