Only call Free in unmanaged->managed stubs when ownership has been transfered to the callee#86415
Merged
jkoritzinsky merged 9 commits intodotnet:mainfrom May 23, 2023
Merged
Conversation
|
Tagging subscribers to this area: @dotnet/interop-contrib Issue DetailsFixes #85795
|
d43ce76 to
18b5e4a
Compare
...Microsoft.Interop.SourceGeneration/Marshalling/AttributedMarshallingModelGeneratorFactory.cs
Outdated
Show resolved
Hide resolved
elinor-fung
reviewed
May 18, 2023
...nteropServices/tests/ComInterfaceGenerator.Tests/UnmanagedToManagedCustomMarshallingTests.cs
Outdated
Show resolved
Hide resolved
jtschuster
reviewed
May 18, 2023
...pServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/StatelessMarshallingStrategy.cs
Outdated
Show resolved
Hide resolved
18b5e4a to
fafc39a
Compare
…ansfered to the callee Fixes dotnet#85795
…sable by-value [In,Out] on unmanged->managed for now as it's difficult to reason about.
…o-managed. It still needs additional work to function, but this at least fixes the compilation problems, enabling usage in managed->unmanaged COM scenarios.
fafc39a to
fcefc57
Compare
This was referenced May 20, 2023
… the expectation (always free stateful marshaller state, only free elements when we're supposed to).
Member
Author
|
I've updated this PR to correctly handle lifetimes for collection marshallers (stateless and stateful). I've opened #86608 to track additional work to complete this story. |
Member
Author
|
All failures are known |
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.
Fixes #85795