User/kythant/add functional type marshaling#2248
Closed
kythant wants to merge 25 commits intostaging/3.0from
Closed
User/kythant/add functional type marshaling#2248kythant wants to merge 25 commits intostaging/3.0from
kythant wants to merge 25 commits intostaging/3.0from
Conversation
This reverts commit 4a3832e.
Co-authored-by: Sergio Pedri <sergio0694@live.com>
* Add string array marshaling support for pass array * Introduce HStringHeader and refactor marshalling Add a new HStringHeader struct for fast-pass HSTRING headers and refactor array marshalling to use it. Move HSTRING_HEADER to an internal type with public union fields to expose the underlying layout, remove the array conversion/Dispose helpers from HStringMarshaller, and implement array-specific ConvertToUnmanagedUnsafe and Dispose in HStringArrayMarshaller. Update code generation (code_writers.h) to allocate/pool HStringHeader arrays and call HStringArrayMarshaller accordingly. These changes separate single-value and array marshalling logic, tighten pinning requirements, and improve pooling behavior. --------- Co-authored-by: Sergio Pedri <sergio0694@live.com>
Wrap the GetOrCreateObjectForComInstance call in a try/finally and always reset the shared state fields (ObjectComWrappersCallback, UnsealedObjectComWrappersCallback, CreateObjectTargetInterfacePointer) to null. This ensures those fields are cleared even on exceptions so subsequent calls or external callbacks (e.g. from a WeakReference<T>) won't observe stale state and cause incorrect behavior.
* Fix reference count issues * Super nits --------- Co-authored-by: Sergio Pedri <sergio0694@live.com>
77ea73b to
c972217
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.