From 098b5dfe346cc1910e4987809cc89fa90ed46a15 Mon Sep 17 00:00:00 2001 From: dskkato Date: Tue, 1 Jun 2021 13:00:49 +0900 Subject: [PATCH] add TString deallocation --- include/cppflow/tensor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/cppflow/tensor.h b/include/cppflow/tensor.h index 6bca461..4e61c82 100644 --- a/include/cppflow/tensor.h +++ b/include/cppflow/tensor.h @@ -157,6 +157,7 @@ namespace cppflow { TF_TString_Copy(&tstr[0], value.c_str(), value.size()); *this = tensor(static_cast(TF_STRING), (void *) tstr, sizeof(tstr), {}); + TF_TString_Dealloc(&tstr[0]); } #else template<>