aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/c/test_op.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2016-09-12 16:07:46 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-09-12 17:16:08 -0700
commit56b003d724ecb3e7781165fd4504d058982959c1 (patch)
tree7a36568edabdc818ef6c63ee503acdb2fdfb6fee /tensorflow/c/test_op.cc
parent6de77d7f296c2fce09afa0f86c5237a5d42be153 (diff)
Add TF_DeleteLibraryHandle, for freeing the memory allocated by TF_LoadLibrary.
This is useful when calling the C API from C++, to avoid memory leaks being reported. Change: 132937873
Diffstat (limited to 'tensorflow/c/test_op.cc')
-rw-r--r--tensorflow/c/test_op.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/tensorflow/c/test_op.cc b/tensorflow/c/test_op.cc
new file mode 100644
index 0000000000..c1a1f1cdb1
--- /dev/null
+++ b/tensorflow/c/test_op.cc
@@ -0,0 +1,23 @@
+/* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+==============================================================================*/
+
+#include "tensorflow/core/framework/op.h"
+#include "tensorflow/core/framework/op_kernel.h"
+
+namespace tensorflow {
+
+REGISTER_OP("TestCApi").Doc(R"doc(Used to test C API)doc");
+
+} // namespace tensorflow