-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[release/5.0] Notify Reference Tracker runtime of disconnect at the right time #58412
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
[release/5.0] Notify Reference Tracker runtime of disconnect at the right time #58412
Conversation
Based on misunderstanding of SyncBlock clean-up modes the indication of when an Native Object Wrapper was being collected was being done after the wrapper's Finalizer was run. However, this information must be conveyed prior to wrapper finalization and synchronously during the GC.
jeffschwMSFT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved. Please get a code review and we can take for consideration for 5.0.x.
elinor-fung
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comments are minor things for when this goes to 7.0 - not so much for 5.0
src/tests/Interop/COM/ComWrappers/MockReferenceTrackerRuntime/ReferenceTrackerRuntime.cpp
Outdated
Show resolved
Hide resolved
There is no .NET 7 PR yet, but I will fold this feedback into that when it is opened. |
davidwrighton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
|
Is there a reason this was scheduled for 5.0.11 and not the next update? I guess 5.0.11 could be roughly expected in the middle of October, right? |
|
@Marv51 Yes, this is for the October update. Unfortunately we missed the 5.0.10 release snap so this was pushed to the next service release. |
Fixes microsoft/CsWinRT#840
Customer Impact
Based on misunderstanding of SyncBlock clean-up modes the indication of when an Native Object Wrapper was being collected was being done after the wrapper's Finalizer was run. However, this information must be conveyed prior to wrapper finalization and synchronously during the GC. See
IReferenceTracker::DisconnectFromTrackerSource.Workaround
There are no workarounds for this issue.
Testing
Added a tests. Have provided private binaries to C#/WinRT team for validation.
Risk
Minimal. .NET 5 is the first release of
ComWrappersand this issue only impacts WinRT scenarios./cc @davidwrighton @jkoritzinsky @elinor-fung