diff --git a/src/TensorFlowNET.Core/APIs/c_api.cs b/src/TensorFlowNET.Core/APIs/c_api.cs index 310fada5..6852e2d7 100644 --- a/src/TensorFlowNET.Core/APIs/c_api.cs +++ b/src/TensorFlowNET.Core/APIs/c_api.cs @@ -50,8 +50,12 @@ namespace Tensorflow return handle == IntPtr.Zero ? String.Empty : Marshal.PtrToStringAnsi(handle); } + [UnmanagedFunctionPointer(CallingConvention.Winapi)] public delegate void Deallocator(IntPtr data, IntPtr size, ref DeallocatorArgs args); + + [UnmanagedFunctionPointer(CallingConvention.Winapi)] public delegate void DeallocatorV2(IntPtr data, long size, IntPtr args); + public struct DeallocatorArgs { internal static unsafe c_api.DeallocatorArgs* EmptyPtr;