Note that IteratorHandleOp holds a reference to the resource it creates. If cleaning up resources with DestroyResourceOp is important, consider creating resource containers with AnonymousIteratorHandleOp instead.
| 265 | // cleaning up resources with DestroyResourceOp is important, consider creating |
| 266 | // resource containers with AnonymousIteratorHandleOp instead. |
| 267 | IteratorHandleOp::IteratorHandleOp(OpKernelConstruction* ctx) |
| 268 | : OpKernel(ctx), graph_def_version_(ctx->graph_def_version()) { |
| 269 | OP_REQUIRES_OK(ctx, ctx->GetAttr(kOutputTypes, &output_dtypes_)); |
| 270 | OP_REQUIRES_OK(ctx, ctx->GetAttr(kOutputShapes, &output_shapes_)); |
| 271 | OP_REQUIRES_OK(ctx, ctx->GetAttr("shared_name", &name_)); |
| 272 | } |
| 273 | |
| 274 | // The resource is deleted from the resource manager only when it is private |
| 275 | // to kernel. Ideally the resource should be deleted when it is no longer held |
nothing calls this directly
no test coverage detected