forked from dotnet/maui
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ios] fix memory leak with
Page
+ Layout
Further fixes: dotnet#13520 7d0af63 did not appear to be a complete fix for dotnet#13520, as when I retested the customer sample, I found I needed to remove a `VerticalStackLayout` for the problem to go away. I could reproduce the issue in a test by doing: var page = new ContentPage { Title = "Page 2", Content = new VerticalStackLayout { new Label() } }; After lots of debugging, I found the underlying issue was that `MauiView` on iOS held a reference to the cross-platform `IView`. After changing the backing field for this to be a `WeakReference<IView>` the above problem appears to be solved. I also removed `LayoutView.CrossplatformArrange/Measure` as we can just use the `View` property directly instead.
- Loading branch information
1 parent
9aa30fc
commit b9de72b
Showing
5 changed files
with
22 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters