From ae9435be2ad6b149b6e0614c495860407ded8423 Mon Sep 17 00:00:00 2001 From: Neucrack Date: Wed, 7 Aug 2024 17:28:05 +0800 Subject: [PATCH] fix tensor rm method bug --- components/basic/include/maix_tensor.hpp | 4 ++++ 1 file changed, 4 insertions(+) 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); }