Skip to content

Commit ff429da

Browse files
committed
reenable free in marshaling
1 parent 06463dd commit ff429da

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Rubjerg.Graphviz/Marshaling.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ public static T MarshalToUtf8<T>(string? s, Func<IntPtr, T> continuation, bool f
6161
{
6262
if (free && ptr != IntPtr.Zero)
6363
{
64-
// FIXNOW
65-
// Marshal.FreeHGlobal(ptr);
64+
Marshal.FreeHGlobal(ptr);
6665
}
6766
}
6867
}
@@ -83,8 +82,7 @@ public static T MarshalToUtf8<T>(string? s, Func<IntPtr, T> continuation, bool f
8382
Marshal.Copy(ptr, byteArray, 0, len);
8483
if (free)
8584
{
86-
// FIXNOW
87-
// free_str(ptr);
85+
free_str(ptr);
8886
}
8987
return byteArray;
9088
}

0 commit comments

Comments
 (0)