diff --git a/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs index 5fc955ea0b15..dfcc8e031a78 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs @@ -1407,8 +1407,11 @@ class ParentingViewController : UIViewController List _trackedToolbarItems = new List(); bool _toolbarUpdatePending = false; + [UnconditionalSuppressMessage("Memory", "MEM0002", Justification = "Proxy scroll view is removed from its superview, disposed, and cleared in RemoveLargeTitleProxyScrollView.")] UIScrollView _largeTitleProxyScrollView; + [UnconditionalSuppressMessage("Memory", "MEM0002", Justification = "Observed scroll view reference is cleared in TearDownLargeTitleProxyScrollView.")] UIScrollView _largeTitleObservedScrollView; + [UnconditionalSuppressMessage("Memory", "MEM0002", Justification = "Observer is disposed and cleared in TearDownLargeTitleProxyScrollView.")] IDisposable _largeTitleContentOffsetObserver; PointF _largeTitleInitialContentOffset; bool _largeTitleProxyScrollObservationArmed; diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/UIContainerCell.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/UIContainerCell.cs index e5a0f5196f63..0710a54acccf 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/UIContainerCell.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/UIContainerCell.cs @@ -14,6 +14,7 @@ public class UIContainerCell : UITableViewCell IPlatformViewHandler _renderer; [UnconditionalSuppressMessage("Memory", "MEM0002", Justification = "Binding context is unsubscribed from PropertyChanged and cleared in Disconnect.")] object _bindingContext; + [UnconditionalSuppressMessage("Memory", "MEM0002", Justification = "Resources changed listener is removed and the reference cleared in Disconnect.")] IElementDefinition _viewResource; [UnconditionalSuppressMessage("Memory", "MEM0002", Justification = "Measure callback is cleared in Disconnect before the cell is released.")] diff --git a/src/Controls/src/Core/Handlers/Items/iOS/MauiCollectionView.cs b/src/Controls/src/Core/Handlers/Items/iOS/MauiCollectionView.cs index 25c118ea9f48..769af9e0b172 100644 --- a/src/Controls/src/Core/Handlers/Items/iOS/MauiCollectionView.cs +++ b/src/Controls/src/Core/Handlers/Items/iOS/MauiCollectionView.cs @@ -46,6 +46,7 @@ public class MauiCollectionView : UICollectionView, IUIViewLifeCycleEvents, IPla static readonly nfloat SilentResetThreshold = 10f; // KVO observer token for contentOffset — active while the view is attached to a window. + [UnconditionalSuppressMessage("Memory", "MEM0002", Justification = "Observer is disposed and cleared when the view is detached from its window or the view is disposed.")] IDisposable? _contentOffsetObserver; internal void SetPendingScrollRestore(int section, int item, UICollectionViewScrollPosition position) diff --git a/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt index 7784e8a2e579..b87e005240dd 100644 --- a/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt @@ -18,10 +18,7 @@ override Microsoft.Maui.Controls.Platform.Compatibility.ShellTableViewController override Microsoft.Maui.Controls.Shapes.Shape.OnPropertyChanged(string? propertyName = null) -> void ~override Microsoft.Maui.Controls.SwipeItems.OnPropertyChanged(string propertyName = null) -> void override Microsoft.Maui.Controls.TitleBar.OnBindingContextChanged() -> void -override Microsoft.Maui.Controls.Handlers.Items2.StructuredItemsViewController2.UpdateFlowDirection() -> void Microsoft.Maui.Controls.IndicatorView.~IndicatorView() -> void -~override Microsoft.Maui.Controls.SwipeItems.OnPropertyChanged(string propertyName = null) -> void -Microsoft.Maui.Controls.Label.~Label() -> void override Microsoft.Maui.Controls.Handlers.Items.MauiCollectionView.LayoutSubviews() -> void ~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.TraitCollectionDidChange(UIKit.UITraitCollection previousTraitCollection) -> void ~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.ViewWillTransitionToSize(CoreGraphics.CGSize toSize, UIKit.IUIViewControllerTransitionCoordinator coordinator) -> void diff --git a/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index 4e15736aa85f..6aff23373998 100644 --- a/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -20,10 +20,7 @@ override Microsoft.Maui.Controls.Platform.Compatibility.ShellTableViewController override Microsoft.Maui.Controls.Shapes.Shape.OnPropertyChanged(string? propertyName = null) -> void ~override Microsoft.Maui.Controls.SwipeItems.OnPropertyChanged(string propertyName = null) -> void override Microsoft.Maui.Controls.TitleBar.OnBindingContextChanged() -> void -override Microsoft.Maui.Controls.Handlers.Items2.StructuredItemsViewController2.UpdateFlowDirection() -> void Microsoft.Maui.Controls.IndicatorView.~IndicatorView() -> void -~override Microsoft.Maui.Controls.SwipeItems.OnPropertyChanged(string propertyName = null) -> void -Microsoft.Maui.Controls.Label.~Label() -> void override Microsoft.Maui.Controls.Handlers.Items.MauiCollectionView.LayoutSubviews() -> void ~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.TraitCollectionDidChange(UIKit.UITraitCollection previousTraitCollection) -> void ~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.ViewWillTransitionToSize(CoreGraphics.CGSize toSize, UIKit.IUIViewControllerTransitionCoordinator coordinator) -> void