-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 in Border (#15946)
Context: #14664 Context: https://github.com/nacompllo/MemoryLeakEverywhere/tree/bugfix/memoryLeakItemsSource While looking at the customer sample, we found an issue with `BorderHandler`: * `ContentView` -> via `LayoutSubviewsChanged` * `BorderHandler` -> * `ContentView` Creating a cycle & memory leak on iOS and Catalyst. We could reproduce this in a device test. It appears the event only did this: void OnLayoutSubviewsChanged(object? sender, EventArgs e) { PlatformView?.UpdateMauiCALayer(); } And so instead, we can just call the extension method directly: this.UpdateMauiCALayer(); And the leak is gone! Co-authored-by: Haritha Mohan <harithamohan@microsoft.com>
- Loading branch information
1 parent
01fe19f
commit d211b85
Showing
3 changed files
with
53 additions
and
13 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