-
Notifications
You must be signed in to change notification settings - Fork 975
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
Over-release now that VARIANT
is using IDisposable
.
#7325
Conversation
Thank you! |
There are some other issues here. One of them is the following where the assert is causing the test host to crash. The OS is Windows 11. winforms/src/System.Windows.Forms/src/System/Windows/Forms/Application.ThreadContext.cs Lines 308 to 315 in 0aaae6b
|
There is also still the |
@AaronRobinsonMSFT , which test was this? Did you run the test locally as well? |
@dreddy-work That is from running locally. I just ran |
@dreddy-work The stack is the following:
|
I am running this test locally and in debug mode and it does not fail. Only reason why we enter into this situation is, for some reason, on the machine where we are running these tests or the way we are running tests, we couldn't set thread's |
I'll let you know. I am running against a Checked build of coreclr so it may behave slightly different. |
3c9aaea
I'd appreciate another look here. I've removed the |
@AaronRobinsonMSFT can you add some more details on how |
Sure. The issues overshadow these wins though. The biggest annoyance is that it is close to impossible to properly detach the The part that makes this substantially more difficult is when any cross-apartment marshalling occurs, because that also allocates memory that The gist here is |
Thank you @AaronRobinsonMSFT. @JeremyKuhne I'm going to merge this to unblock the backlog. Maybe we could get together with @AaronRobinsonMSFT and chat about options to tests winforms/src/System.Windows.Forms.Primitives/src/Interop/Ole32/Interop.CALPOLESTR.cs Lines 39 to 47 in 0aaae6b
winforms/src/System.Windows.Forms.Primitives/src/Interop/Ole32/Interop.CADWORD.cs Line 30 in 0aaae6b
|
There is now an over-release in the
VARIANT
tests. This is caused byVARIANT
now implementingIDisposable
.Found while investigating dotnet/runtime#70973.
It was also observed that the use of the
using var ... = new VARIANT(...)
has left a lot of cruft. Most places also continue to callClose()
orDispose()
even though they have theusing var
semantic. I highly recommend someone go through this and clean up this as it is very confusing./cc @JeremyKuhne @RussKie
Microsoft Reviewers: Open in CodeFlow