[Windows] Fix memory leak with GroupedItemTemplateCollection#23386
Merged
[Windows] Fix memory leak with GroupedItemTemplateCollection#23386
Conversation
src/Controls/src/Core/Platform/Windows/CollectionView/GroupedItemTemplateCollection.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Platform/Windows/CollectionView/GroupedItemTemplateCollection.cs
Outdated
Show resolved
Hide resolved
Contributor
Author
|
/rebase |
8ec09aa to
40daa0b
Compare
Contributor
Author
|
/rebase |
Contributor
Author
|
/azp |
Supported commands
See additional documentation. |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
pictos
reviewed
Aug 23, 2024
| readonly WeakNotifyCollectionChangedProxy _proxy = new(); | ||
| bool _disposedValue; | ||
|
|
||
| ~GroupedItemTemplateCollection() => _proxy.Unsubscribe(); |
Contributor
There was a problem hiding this comment.
On Dispose you do a null check with ? operator... Wouldn't make sense to do it here as well?
Contributor
Author
|
/rebase |
1 similar comment
Contributor
|
/rebase |
MartyIX
reviewed
Oct 23, 2024
Comment on lines
+333
to
+335
| await Task.Yield(); | ||
| GC.Collect(); | ||
| GC.WaitForPendingFinalizers(); |
Contributor
There was a problem hiding this comment.
There is a helper method that does it more robustly, is there not?
This one
, I believe.
Contributor
Author
|
/rebase |
rmarinho
reviewed
Nov 21, 2024
src/Controls/src/Core/Platform/Windows/CollectionView/GroupedItemTemplateCollection.cs
Outdated
Show resolved
Hide resolved
rmarinho
reviewed
Nov 21, 2024
src/Controls/src/Core/Platform/Windows/CollectionView/ObservableItemTemplateCollection.cs
Outdated
Show resolved
Hide resolved
Member
|
/rebase |
rmarinho
approved these changes
Dec 9, 2024
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description of Change
Fix missing event cleanup in
GroupedItemTemplateCollectionto match the cleanup pattern inObservableItemTemplateCollection. This fixed a minor memory leak with grouped item collections on WindowsIssues Fixed
Fixes #22954