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.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/csharp/Grpc.Core/Internal/CStringSafeHandle.cs b/src/csharp/Grpc.Core/Internal/CStringSafeHandle.cs
index 92fbe8cf0f..4ae57aa773 100644
--- a/src/csharp/Grpc.Core/Internal/CStringSafeHandle.cs
+++ b/src/csharp/Grpc.Core/Internal/CStringSafeHandle.cs
@@ -1,5 +1,5 @@
#region Copyright notice and license
-// Copyright 2015, Google Inc.
+// Copyright 2015-2016, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -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;
}
}