Skip to content
Snippets Groups Projects
Commit c6b55569 authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

gchandle is not needed anymore

parent d367748d
No related branches found
No related tags found
No related merge requests found
...@@ -53,7 +53,6 @@ namespace Grpc.Core.Internal ...@@ -53,7 +53,6 @@ namespace Grpc.Core.Internal
protected readonly object myLock = new object(); protected readonly object myLock = new object();
protected GCHandle gchandle;
protected CallSafeHandle call; protected CallSafeHandle call;
protected bool disposed; protected bool disposed;
...@@ -113,9 +112,6 @@ namespace Grpc.Core.Internal ...@@ -113,9 +112,6 @@ namespace Grpc.Core.Internal
{ {
lock (myLock) 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; this.call = call;
} }
} }
...@@ -189,7 +185,6 @@ namespace Grpc.Core.Internal ...@@ -189,7 +185,6 @@ namespace Grpc.Core.Internal
{ {
call.Dispose(); call.Dispose();
} }
gchandle.Free();
disposed = true; disposed = true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment