[DllImport(Libraries.Glib, EntryPoint = "g_idle_add", CallingConvention = CallingConvention.Cdecl)]
internal static extern uint IdleAdd(GSourceFunc d, IntPtr data);
+
+ [DllImport(Libraries.Glib, EntryPoint = "g_free", CallingConvention = CallingConvention.Cdecl)]
+ internal static extern void Gfree(IntPtr ptr);
}
}
byte[] hashArr = new byte[hashLength];
Marshal.Copy(hash, hashArr, 0, hashLength);
oobData.HashValue = hashArr;
- Interop.Libc.Free(hash);
+ Interop.Glib.Gfree(hash);
}
if (randomizerLength > 0) {
byte[] randomizerArr = new byte[randomizerLength];
Marshal.Copy(randomizer, randomizerArr, 0, randomizerLength);
oobData.RandomizerValue = randomizerArr;
- Interop.Libc.Free(randomizer);
+ Interop.Glib.Gfree(randomizer);
}
return oobData;
foreach (IntPtr uuids in uuidList)
{
list.Add(Marshal.PtrToStringAnsi(uuids));
- Interop.Libc.Free(uuids);
+ Interop.Glib.Gfree(uuids);
}
- Interop.Libc.Free(uuidListArray);
+ Interop.Glib.Gfree(uuidListArray);
Marshal.FreeHGlobal(scanDataStruct.AdvData);
Marshal.FreeHGlobal(scanDataStruct.ScanData);
return list;
foreach (IntPtr uuids in uuidList)
{
list.Add(Marshal.PtrToStringAnsi(uuids));
- Interop.Libc.Free(uuids);
+ Interop.Glib.Gfree(uuids);
}
- Interop.Libc.Free(uuidListArray);
+ Interop.Glib.Gfree(uuidListArray);
Marshal.FreeHGlobal(scanDataStruct.AdvData);
Marshal.FreeHGlobal(scanDataStruct.ScanData);
return list;
Marshal.Copy(manufData, data.Data, 0, data.DataLength);
}
- Interop.Libc.Free(manufData);
+ Interop.Glib.Gfree(manufData);
Marshal.FreeHGlobal(scanDataStruct.AdvData);
Marshal.FreeHGlobal(scanDataStruct.ScanData);
return data;