From a053d7ba69ce9c42f6c854f20aa565407de8c3f7 Mon Sep 17 00:00:00 2001 From: "karl@kubx.ca" Date: Mon, 27 Aug 2018 21:51:23 -0400 Subject: Add mention about default_value lifetime constraint --- tensorflow/java/src/gen/cc/op_specs.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tensorflow/java') diff --git a/tensorflow/java/src/gen/cc/op_specs.h b/tensorflow/java/src/gen/cc/op_specs.h index 7ad19af562..4adcfca96a 100644 --- a/tensorflow/java/src/gen/cc/op_specs.h +++ b/tensorflow/java/src/gen/cc/op_specs.h @@ -94,7 +94,10 @@ class AttributeSpec { // jni_type: the type of this attribute in JNI layer (see OperationBuilder) // description: a description of this attribute, in javadoc // iterable: true if this attribute is a list - // default_value: default value for this attribute or nullptr if none + // default_value: default value for this attribute or nullptr if none. Any + // value referenced by this pointer must outlive the lifetime + // of the AttributeSpec. This is guaranteed if the value is + // issued by an OpDef of the global OpRegistry. AttributeSpec(const string& op_def_name, const Variable& var, const Type& type, const Type& jni_type, const string& description, bool iterable, -- cgit v1.2.3