Commit fb106978 authored by Brennan Saeta's avatar Brennan Saeta Committed by TensorFlower Gardener
Browse files

[tf.data] Use core::ScopedUnref to avoid resource leakage.

If for whatever reason iterator_resource->set_iterator did not return Status::OK(), we would leak a reference on the iterator_resource. With this change, we won't leak the resource.

PiperOrigin-RevId: 194662412
parent c0185835
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment