diff --git a/components/basic/include/maix_tensor.hpp b/components/basic/include/maix_tensor.hpp index 54a0feae..969d29d3 100644 --- a/components/basic/include/maix_tensor.hpp +++ b/components/basic/include/maix_tensor.hpp @@ -491,6 +491,10 @@ namespace maix */ void rm_tensor(const std::string &key) { + if(_auto_delete[key]) + { + delete tensors[key]; + } tensors.erase(key); }