Browse Source

Tensor: Fixed redundant check and assignment in DisposeUnmanagedResources

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

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

@@ -568,11 +568,7 @@ namespace Tensorflow

protected override void DisposeUnmanagedResources(IntPtr handle)
{
if (handle != IntPtr.Zero)
{
c_api.TF_DeleteTensor(handle);
_handle = IntPtr.Zero;
}
c_api.TF_DeleteTensor(handle);
}

public bool IsDisposed


Loading…
Cancel
Save