Skip to content

Commit

Permalink
Use Marshal.FreeHGlobal() instead of Libc.Free() (#5636)
Browse files Browse the repository at this point in the history
Signed-off-by: Hwankyu Jhun <[email protected]>
  • Loading branch information
hjhun authored and devusr-sw-kim committed Nov 17, 2023
1 parent 16bc240 commit 29862b7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
27 changes: 0 additions & 27 deletions src/Tizen.Content.MimeType/Interop/Interop.Libc.cs

This file was deleted.

1 change: 0 additions & 1 deletion src/Tizen.Content.MimeType/Interop/Interop.Libraries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ internal static partial class Libraries
{
public const string Mime = "libcapi-content-mime-type.so.0";
public const string Glib = "libglib-2.0.so.0";
public const string Libc = "libc.so.6";
}
}
4 changes: 2 additions & 2 deletions src/Tizen.Content.MimeType/Tizen.Content.MimeType/MimeUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ public static IEnumerable<string> GetFileExtension(string mime)
foreach (IntPtr extension in extensionList)
{
coll.Add(Marshal.PtrToStringAnsi(extension));
Interop.Libc.Free(extension);
Marshal.FreeHGlobal(extension);
}
Interop.Libc.Free(extensionArray);
Marshal.FreeHGlobal(extensionArray);
return coll;
}

Expand Down

0 comments on commit 29862b7

Please sign in to comment.