Open jtschuster opened 1 year ago
Tagging subscribers to this area: @dotnet/interop-contrib See info in area-owners.md if you want to be subscribed.
Author: | jtschuster |
---|---|
Assignees: | - |
Labels: | `area-System.Runtime.InteropServices` |
Milestone: | Future |
For jagged arrays, the marshallers won't free a partially marshalled inner array because it doesn't consider the inner array to have completed marshalling until all inner elements are marshalled, and therefore assumes the inner array doesn't need to be freed. Usually this is the behavior we want, because most array elements can't be partially marshalled and won't need partial freeing, but inner arrays of jagged arrays may be partially marshalled.
This is an unsupported scenario and only occurs when marshalling fails.