We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86464a3 commit 49ab022Copy full SHA for 49ab022
src/Generator/Types/Std/Stdlib.cs
@@ -324,7 +324,7 @@ public override void CSharpMarshalToNative(CSharpMarshalContext ctx)
324
ctx.Before.WriteLine($@"{qualifiedBasicString}Extensions.{
325
assign.Name}({varBasicString}, {ctx.Parameter.Name});");
326
ctx.Return.Write($"{varBasicString}.{Helpers.InstanceIdentifier}");
327
- if (!type.IsPointer())
+ if (!type.IsPointer() || ctx.Parameter.IsIndirect)
328
ctx.Cleanup.WriteLine($@"{varBasicString}.Dispose({
329
(ctx.MarshalKind == MarshalKind.NativeField ? "false" : string.Empty)});");
330
}
0 commit comments