[release/7.0] Free LOADERHANDLE
DispatchMemberInfo
dtor
#77570
Merged
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.
Backport of #77554 to release/7.0
/cc @AaronRobinsonMSFT
Customer Impact
This is a customer reported issue - #76350. The leak was introduced in .NET Core 3.1 and has gone unreported since then. This is specifically for the
IReflect
scenario, which is mostly related to classIDispatch
COM interop scenarios.Although this impacts previous .NET runtimes, the OP has created a workaround and is not specifically asking for fixes prior to .NET 7.
Testing
Manually validated the user scenario and made the surrounding code easier to reason about. Validation was done using the Visual Studio Diagnostic tools for memory allocations.
Risk
Limited. This is for a relatively uncommon .NET Core scenario. The issue has existed since .NET Core 3.1 without being reported and the fix is scoped to only impact that particular scenario.