aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core/Internal/CStringSafeHandle.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/csharp/Grpc.Core/Internal/CStringSafeHandle.cs')
-rw-r--r--src/csharp/Grpc.Core/Internal/CStringSafeHandle.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/csharp/Grpc.Core/Internal/CStringSafeHandle.cs b/src/csharp/Grpc.Core/Internal/CStringSafeHandle.cs
index 92fbe8cf0f..0221798d2a 100644
--- a/src/csharp/Grpc.Core/Internal/CStringSafeHandle.cs
+++ b/src/csharp/Grpc.Core/Internal/CStringSafeHandle.cs
@@ -39,8 +39,7 @@ namespace Grpc.Core.Internal
/// </summary>
internal class CStringSafeHandle : SafeHandleZeroIsInvalid
{
- [DllImport("grpc_csharp_ext.dll")]
- static extern void gprsharp_free(IntPtr ptr);
+ static readonly NativeMethods Native = NativeMethods.Get();
private CStringSafeHandle()
{
@@ -53,7 +52,7 @@ namespace Grpc.Core.Internal
protected override bool ReleaseHandle()
{
- gprsharp_free(handle);
+ Native.gprsharp_free(handle);
return true;
}
}