Browse Source

Tensor.Creation: uncommented FreeGCHandle deallocation

tags/v0.12
Eli Belash 6 years ago
parent
commit
288085be0c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs

+ 1
- 1
src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs View File

@@ -678,7 +678,7 @@ namespace Tensorflow
if (args.deallocator_called || args.gc_handle == IntPtr.Zero)
return;
// note: since the ptr given to tensorflow is just the addr of the pinned object we can not directly free it! we need to free the gcHandle instead
//args.gchandle.Free();
GCHandle.FromIntPtr(args.gc_handle).Free();
args.deallocator_called = true;
}



Loading…
Cancel
Save