Closed kirsan31 closed 3 weeks ago
Attention: Patch coverage is 98.57143%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 75.26360%. Comparing base (
6b443fc
) to head (ccc87f9
).
Added commit that fix #4808 (thanks to @elachlan).
@Olina-Zhang Could your team please test this pr to confirm the issues are resolved?
@Olina-Zhang Could your team please test this pr to confirm the issues are resolved?
@elachlan @kirsan31 Tested this PR, just can confirm that GH issue https://github.com/dotnet/winforms/issues/4808 is fixed, I am not clear how to verify https://github.com/dotnet/winforms/issues/11334, can you give some more information about how to repro it?
@Olina-Zhang
can you give some more information about how to repro it?
Same repro app, the key is to remove item immediately after MouseHoverTimer
has started. So simply hover and immediately click:
https://github.com/dotnet/winforms/assets/17767561/aa6c7f35-347e-4661-9ead-bc17c88b02ab
@kirsan31 thanks for your info. Adding the GH issue https://github.com/dotnet/winforms/issues/11334 validation: fixed
Fix #4808 and problem that was mentioned in #11334.
Proposed changes
Replace
ToolStripItem? _currentItem
withWeakReference<ToolStripItem?> _currentItem
inMouseHoverTimer
Implement this suggestion.Customer Impact
No more memory leak if
ToolStripItem
will be disposed after MouseHoverTimer start. No more memory leak of chilled elements due toDisplayedItems
andOverflowItems
collections..Regression?
Risk
Minimal.
Screenshots
ToolStripItem
below was disposed, but remain in memory:Test methodology
Microsoft Reviewers: Open in CodeFlow