From fb6903929250f0efed7abd7bb4261f4cc4e3dbc3 Mon Sep 17 00:00:00 2001 From: Realjayden <89341955+Realjayden@users.noreply.github.com> Date: Fri, 14 Jun 2024 22:56:34 +0800 Subject: [PATCH] Delete temporary object nhwc_Tensor to avoid memory leak --- cpp_demo/mnn/src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp_demo/mnn/src/main.cpp b/cpp_demo/mnn/src/main.cpp index 6cc3ab26..bd4e0f36 100644 --- a/cpp_demo/mnn/src/main.cpp +++ b/cpp_demo/mnn/src/main.cpp @@ -103,6 +103,7 @@ std::vector decode(cv::Mat &cv_mat, std::shared_ptr & bbox_collection.push_back(box); } #endif + delete nhwc_Tensor; return bbox_collection; }