From c6b55569bcfa7c5dd717b96962b4ecc1ed9bdfa3 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 5 Jun 2015 18:37:16 -0700 Subject: gchandle is not needed anymore --- src/csharp/Grpc.Core/Internal/AsyncCallBase.cs | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/csharp') diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs index 54f710ae6f..64713c8c52 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs @@ -53,7 +53,6 @@ namespace Grpc.Core.Internal protected readonly object myLock = new object(); - protected GCHandle gchandle; protected CallSafeHandle call; protected bool disposed; @@ -113,9 +112,6 @@ namespace Grpc.Core.Internal { lock (myLock) { - // Make sure this object and the delegated held by it will not be garbage collected - // before we release this handle. - gchandle = GCHandle.Alloc(this); this.call = call; } } @@ -189,7 +185,6 @@ namespace Grpc.Core.Internal { call.Dispose(); } - gchandle.Free(); disposed = true; } -- cgit v1.2.3