diff options
author | James Keeling <jtkeeling@google.com> | 2018-07-24 09:51:13 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-24 09:57:12 -0700 |
commit | a45ffbd9b5c7d8fdaae6e41432f916639bdbe305 (patch) | |
tree | da13772f02b54c6392294a74d9b6d8761ecde980 /tensorflow/c/c_api.h | |
parent | 568727eed199dba04e37f500265b50f96fed455e (diff) |
Allow TF_Delete* functions to accept nullptr
The TF_Delete* functions in TensorFlow's C API now safely do nothing when asked to delete a null pointer. This mirrors the behaviour of free in C and delete in C++.
PiperOrigin-RevId: 205844191
Diffstat (limited to 'tensorflow/c/c_api.h')
-rw-r--r-- | tensorflow/c/c_api.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tensorflow/c/c_api.h b/tensorflow/c/c_api.h index c5035e0e41..c8ae6f2dd1 100644 --- a/tensorflow/c/c_api.h +++ b/tensorflow/c/c_api.h @@ -44,6 +44,7 @@ limitations under the License. // * size_t is used to represent byte sizes of objects that are // materialized in the address space of the calling process. // * int is used as an index into arrays. +// * Deletion functions are safe to call on nullptr. // // Questions left to address: // * Might at some point need a way for callers to provide their own Env. |