[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
Loading
Please sign in to comment