Browse Source

fix memory leak due to wrong handle sent to api (#339)

A simple typo that led to a memory leak.
tags/v0.12
Sattisvar TANDABANY Haiping 6 years ago
parent
commit
29265c55ee
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/TensorFlowNET.Core/Tensors/Tensor.cs

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

@@ -363,7 +363,7 @@ namespace Tensorflow
_handle=IntPtr.Zero;
}
if (h != IntPtr.Zero)
c_api.TF_DeleteTensor(_handle);
c_api.TF_DeleteTensor(h);
status.Dispose();
GC.SuppressFinalize(this);
}


Loading…
Cancel
Save