We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd18f5d commit 7e46d4fCopy full SHA for 7e46d4f
1 file changed
test/TensorFlowNET.UnitTest/CSession.cs
@@ -40,10 +40,7 @@ public void SetInputs(Dictionary<Operation, Tensor> inputs)
40
41
private void DeleteInputValues()
42
{
43
- for (var i = 0; i < input_values_.Count; ++i)
44
- {
45
- input_values_[i].Dispose();
46
- }
+ //clearing is enough as they will be disposed by the GC unless they are referenced else-where.
47
input_values_.Clear();
48
}
49
@@ -60,11 +57,7 @@ public void SetOutputs(TF_Output[] outputs)
60
57
61
58
private void ResetOutputValues()
62
59
63
- for (var i = 0; i < output_values_.Count; ++i)
64
65
- if (output_values_[i] != IntPtr.Zero)
66
- output_values_[i].Dispose();
67
68
output_values_.Clear();
69
70
0 commit comments