From f4f2d8b305ae77a9b2f34c168520180109e479a3 Mon Sep 17 00:00:00 2001 From: Slider0007 <115730895+Slider0007@users.noreply.github.com> Date: Tue, 27 Jun 2023 17:00:36 +0200 Subject: [PATCH] Delete TFLiteClass only when ClassFlowCNN gets deleted (#40) --- code/components/jomjol_flowcontroll/ClassFlowCNNGeneral.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/components/jomjol_flowcontroll/ClassFlowCNNGeneral.cpp b/code/components/jomjol_flowcontroll/ClassFlowCNNGeneral.cpp index be3167ed8..247bf5622 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowCNNGeneral.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlowCNNGeneral.cpp @@ -586,7 +586,6 @@ bool ClassFlowCNNGeneral::getNetworkParameter() if (!tflite->LoadModel(zwcnn)) { LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "TFLITE: Failed to load model: " + cnnmodelfile); LogFile.WriteHeapInfo("getNetworkParameter-LoadModel"); - delete tflite; return false; } @@ -692,7 +691,6 @@ bool ClassFlowCNNGeneral::doNeuralNetwork(string time) } else { LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Invoke aborted"); - delete tflite; return false; } @@ -746,7 +744,6 @@ bool ClassFlowCNNGeneral::doNeuralNetwork(string time) } else { LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Invoke aborted"); - delete tflite; return false; } @@ -830,7 +827,6 @@ bool ClassFlowCNNGeneral::doNeuralNetwork(string time) } else { LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Invoke aborted"); - delete tflite; return false; }