-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ios] update MemoryAnalyzers
package, add to Controls
#18318
Draft
jonathanpeppers
wants to merge
2
commits into
dotnet:main
Choose a base branch
from
jonathanpeppers:MemoryAnalyzersForControls
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[ios] update MemoryAnalyzers
package, add to Controls
#18318
jonathanpeppers
wants to merge
2
commits into
dotnet:main
from
jonathanpeppers:MemoryAnalyzersForControls
Conversation
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
* Use MemoryAnalyzers `0.1.0-beta.4` * Rename `Microsoft.Extensions.targets` to `NuGetVersions.targets` as it contains many more packages beyond Microsoft.Extensions * Track MemoryAnalyzers version in `NuGetVersions.targets` * Use analyzer in `Controls.Core.csproj`, this will currently have lots of errors
Oh, this is great. Taking a look to the build, it already have found 362 errors spread between different renderers, mainly ListViewRenderer, Shell renderers etc. |
When you take out the iOS/Catalyst duplicates, I think there are 181:
|
There might also be a bug or two in the analyzer, like this one seems odd (
|
21 tasks
jonathanpeppers
added a commit
to jonathanpeppers/maui
that referenced
this pull request
Nov 13, 2023
Context: dotnet#18365 I could reproduce a leak in `TableView` by adding a parameterized test: [InlineData(typeof(TableView))] public async Task HandlerDoesNotLeak(Type type) `TableViewModelRenderer` has two cycles: * `TableView` -> * `TableViewRenderer` -> * `TableViewModelRenderer` -> * `TableView` via `View` field * `UITableView.Source` -> * `TableViewModelRenderer` -> * `UITableView` via `Table` field I left the `Table` and `View` fields in place to not break any public APIs. They are now unused and marked `[Obsolete]`. I used `WeakReference<T>` to solve these two cycles and the test now passes. The analyzer warned about these locations, but we don't have the analyzer enabled on `Microsoft.Maui.Controls` yet: dotnet#18318 (comment)
rmarinho
pushed a commit
that referenced
this pull request
Nov 17, 2023
Context: #18365 I could reproduce a leak in `TableView` by adding a parameterized test: [InlineData(typeof(TableView))] public async Task HandlerDoesNotLeak(Type type) `TableViewModelRenderer` has two cycles: * `TableView` -> * `TableViewRenderer` -> * `TableViewModelRenderer` -> * `TableView` via `View` field * `UITableView.Source` -> * `TableViewModelRenderer` -> * `UITableView` via `Table` field I left the `Table` and `View` fields in place to not break any public APIs. They are now unused and marked `[Obsolete]`. I used `WeakReference<T>` to solve these two cycles and the test now passes. The analyzer warned about these locations, but we don't have the analyzer enabled on `Microsoft.Maui.Controls` yet: #18318 (comment)
The warnings have increased as I improved the analyzer, 214 now:
|
/rebase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-infrastructure
CI, Maestro / Coherency, upstream dependencies/versions
legacy-area-perf
Startup / Runtime performance
memory-leak 💦
Memory usage grows / objects live forever (sub: perf)
platform/iOS 🍎
stale
Indicates a stale issue/pr and will be closed soon
t/perf
The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
0.1.0-beta.4
Microsoft.Extensions.targets
toNuGetVersions.targets
as it contains many more packages beyond Microsoft.ExtensionsNuGetVersions.targets
Controls.Core.csproj
, this will currently have lots of errors